开发者

How to attach debug IIS native module with VS 2010

I am getting difficulty debugging my custom IIS 开发者_运维百科module written in C++, using VS 2010. The problem is that IIS worker process (w3wp.exe) starts too quickly and there is no way to catch it at the beginning in VS "attach to process" dialog. Is there a good skill to do this? Thanks.


You can add a Debugger Breakpoint in your code . I use this all the time to catch things that are too fast to catch manually.

FYi in .net you use System.Diagnostics.Debugger.Break() to achieve the same effect.

It causes the windows system debugger to be activated.


A trick that I have sometimes used is to introduce an artificial infinite loop at the entry point of my code, I then set a breakpoint in this loop and simply move the next instruction to be out of the loop when the breakpoint is hit - job done!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜