Remote debugging, creating a server
I'm following some WinDbg instruc开发者_运维知识库tions from the CodeProject tutorial.
To start a server, I can get this to work from the command line fine:
WinDbg –server npipe:pipe=pipename
(note: multiple clients can connect).
Where do I enter this from the windbg UI? I tried the command browser window, but that didn't seem to do anything:
.server npipe:pipe=pipename
(note: single client can connect)
This question is related to creating the server from WinDbg UI, not connecting from the client.
I am assuming that you are referring to usermode debugging here, so I will respond with that in mind.
From windbg attached to your program that you want to remote:
If you want to use symbols that are cached on the target, then run: from the Command Window's prompt type .server npipe:pipe=YourPipeName
If you have another machine with with a larger symbol cache, then on the target run: dbgsrv -t tcp:port=4000
This sets up a thin debug client (a.k.a. remote stub) Then on the machine running the debugger, open Windbg > File > Connect to remote stub tcp:server= machine_running_dbgsrv ,port=4000
Now hit F6 and attach to the process you want to debug.
Note: the versions of windbg have to be the same on the machine running dbgsrv and the one running windbg. If they don't match, when you get to part where you hit F6, you end up with no processes in the process list.
- Jason
File -> Connect to remote session. Or just use CTRL-R.
精彩评论