debugging an inproc com server running in dllhost.exe

这一生的挚爱 提交于 2020-01-04 04:53:13

问题


I am writing an inproc com dll that runs in the dllhost.exe surrogate, 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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/5541256/debugging-an-inproc-com-server-running-in-dllhost-exe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!