简体   繁体   中英

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.

我有时使用的一个技巧是在代码的入口点引入一个人工无限循环,然后在此循环中设置一个断点,并在命中断点时将下一条指令移出该循环-完成工作!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM