<p>I have two machines in two different domains. On both I have VS 2005 installed. I want remote debug between them. Without authentication it is possible but I want to debug managed code. I don't want to debug directly since it is really crappy machine.</p>

<p>When I try to attach with debugger I get message "The trust relationship between this workstation and primary domain failed." Any idea how to overcome this ? I tried tricks with adding same local username on both machines but with no luck.</p>

<p>EDIT: I have same local users on both machines. I started both VS2005 and Debugging monitor with RunAs using local users. I turned Windows Auditing on debug machine and I see that local user from VS2005 machine is trying to logon. But he fails with error 0xC000018D (ERROR_TRUSTED_RELATIONSHIP_FAILURE)</p>

[{'answer_id': 29713, 'author': 'Will Dean', 'author_id': 987, 'author_profile': 'https://Stackoverflow.com/users/987', 'pm_score': 1, 'selected': False, 'text': "<p>I seem to remember that I have sometimes found it useful to use RunAs when you run msvcmon (or whatever it's called this week - the remote debugging stub anyway), to force it to start as the user which you have set up to be the same on both machines. </p>\n\n<p>I would guess that on the machine you're running VS on, you will also need to log in as the local user rather than a domain user (or start VS with RunAs).</p>\n\n<p>I have never understood why this needed to be so hard, given that unmanaged debugging is so much easier, and must expose every security hole that managed debugging could.</p>\n"}, {'answer_id': 38889, 'author': 'Steve Steiner', 'author_id': 3892, 'author_profile': 'https://Stackoverflow.com/users/3892', 'pm_score': 4, 'selected': True, 'text': '<p>Gregg Miskely has a <a href="http://blogs.msdn.com/greggm/archive/2004/10/04/237519.aspx" rel="noreferrer">blog post</a> on this.  You might get it to work if both local accounts have the same user name and password.  You might also try dropping your good box from it\'s domain so that you are going from a workgroup to a domain rather than domain to domain.</p>\n'}, {'answer_id': 17620190, 'author': 'Walter Wilfinger', 'author_id': 2184185, 'author_profile': 'https://Stackoverflow.com/users/2184185', 'pm_score': 1, 'selected': False, 'text': '<p>The blog post wasn\'t totally clear that this would work, but I was able to run Visual Studio as my domain account and still debug a process on a machine that was not on a domain.</p>\n\n<p>I have a physical development machine <code>PHYSICAL</code> on a Active Directory domain <code>DOMAIN</code>. I\'m logged in and running Visual Studio as <code>DOMAIN\\employee</code>. </p>\n\n<p>I have a virtual machine <code>VIRTUAL</code> that is not attached to an Active Directory domain at all. This is the machine running the process I want to debug.</p>\n\n<p>Like the blog post says, create local accounts <code>PHYSICAL\\employee</code> (on <code>PHYSICAL</code>) and <code>VIRTUAL\\employee</code> (on <code>VIRTUAL</code>). They both must be Administrators and have the same password as <code>DOMAIN\\employee</code>.</p>\n\n<p>The remote debugger and the process to debug must be run on <code>VIRTUAL</code> while logged in as <code>VIRTUAL\\employee</code>. Then on <code>PHYSICAL</code> while logged in as <code>DOMAIN\\employee</code> I can use "Attach to Process..." and connect to <code>VIRTUAL</code> to get a process list.</p>\n'}]
['https://Stackoverflow.com/questions/29668', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/501/']