开发者

debugging an inproc com server running in dllhost.exe

I am writing an inproc com dll that runs in the dllhost.exe surrogat开发者_开发问答e, but I am running into an issue debugging it.

if there were multiple dllhost.exe's running at once, it would be annoying to find the right one to attach a debugger to. Is there an easy way to identify yours if a lot are running?

Thanks


Process explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653) has convenient feature that allows you to look at which processes have loaded which DLLs. You can also do a search for DLLs in all running processes.

Sysinternals also has a command line utility called ListDLLs (http://technet.microsoft.com/en-us/sysinternals/bb896656) that should work for you.

Once you find the PID of the process that has your DLL, you can attach to it.


There's an alternative strategy. Just don't try to identify which to attach to. Set a breakpoint in your code and attach to all dllhost.exe processes - when a breakpoint is hit that process will pause under debugger.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜