posts - 0,  comments - 2,  trackbacks - 0
1. Start the service which is built in debug version and start Visual Studio, and tools->attach process, select your service process.
2. This can't debug service startup code. In order to debug startup code, in your main function, put _asm { int 3 } as the first line. Run this service and a dialog will pop up,

3. Press Cancel to debug and select a debugger. The program will break at the line following int 3.
4. Call DebugBreak is similar with int 3. It seems DebugBreak is implemented as int 3 in X86 platform. So call DebugBreak if you want to break in both x86 and x64 platform.
5. Of course, DebugBreak should only be used in your debugging process and should not be left in your release code.

posted on 2008-10-27 10:01 Sean 阅读(220) 评论(0)  编辑 收藏 引用
只有注册用户登录后才能发表评论。
<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

hello! 欢迎常来我这里逛逛!

常用链接

留言簿(2)

文章分类(3)

文章档案(4)

相册

收藏夹(4)

搜索

  •  

最新评论