<p>What is your favorite technique for launching a windbg user-mode remote debugging session?
Why is do you prefer this technique over other techniques? (pros/cons)</p>

<p>There are at least four different ways to do user-mode remote debug using windbg, as documented in the "Remote Debugging" section of the debugging tools for windows help file.</p>

<ol>
<li>run app on target then attach to it from the host windbg</li>
<li>have the host windbg use remote.exe to launch the app on the target</li>
<li>have the "smart client" host windbg launch the app on the target via a process server that is running on the target</li>
<li>run a windbg instance on the target machine using the option "-server" to automatically start a server, then connect to the server from a 2nd machine.</li>
</ol>

[{'answer_id': 52871, 'author': 'Rob Walker', 'author_id': 3631, 'author_profile': 'https://Stackoverflow.com/users/3631', 'pm_score': 2, 'selected': False, 'text': "<p>Option 1 is my favourite because it is the simplest.  I get to launch the app in the normal way without worry about getting WinDbg to set the right working directory, pass any command line arguments, etc.</p>\n\n<p>Fortunately I've not run into any cases where this hasn't worked!</p>\n"}, {'answer_id': 53100, 'author': 'JeffJ', 'author_id': 5429, 'author_profile': 'https://Stackoverflow.com/users/5429', 'pm_score': 2, 'selected': False, 'text': '<p>I tend to use option 4 (-server) because it is the only one that doesn\'t "pop" when you break into the kernel debugger long enough for the TCP connection to timeout. But this is more complex and not fully satisfying. So I\'m looking for "best practices".</p>\n'}, {'answer_id': 39134137, 'author': 'Thomas Weller', 'author_id': 480982, 'author_profile': 'https://Stackoverflow.com/users/480982', 'pm_score': 3, 'selected': True, 'text': '<p>There is no "the best" solution. Each of the possibilities has advantages and disadvantages and it\'s good to understand all of them. It depends on several factors like:</p>\n\n<ul>\n<li>where are the symbols located</li>\n<li>which PC has access to the Internet to download the OS symbols</li>\n<li>what amount of data may you copy to the server (clients often accept better if it\'s just a single Exe)</li>\n<li>what\'s the bandwidth between client and server</li>\n<li>do you need other commands that just CDB/WinDbg, e.g. access to CMD, then consider remote.exe</li>\n<li>who\'s available on the server side, a debugging expert whom you can easily tell a lot of cryptic commands or a normal user who barely knows how to start a command prompt</li>\n<li>are both sides in a private network, so you need a "man in the middle" server to be able to access each other (or port forwarding as an alternative, which IT guys don\'t want and it may take days to get it set up)</li>\n</ul>\n\n<p>From those 4 options, don\'t forget that clients often want to see exactly what you do, so they require an RDP session, Teamviewer or similar. That\'s something they understand.</p>\n'}]
['https://Stackoverflow.com/questions/52855', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5429/']