人生是一场不能存盘的RPG,我只能尽量多搞几个Screenshot

June 6, 2006

VS 中使用SOS

出自

More on debugging with SOS.DLL - enter Visual Studio
http://mtaulty.com/blog/archive/2004/08/06/628.aspx

FIX: Unmanaged debugging not possible until you install Visual C++ .NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;813134

//—-调试Managed application
1. 设置project的属性,把”Enable Unmanaged Debugging”设置为true
否则在load sos时vs会报错:

SOS not available while Managed only debugging.
To load SOS, enable unmanaged debugging in your project properties.

如果没有安装 vc++.net, 上面的设置并不会有效果,使用F5直接运行project, vs会报错
—————————
Microsoft Development Environment
—————————
Error while trying to run project: Unable to start debugging.

Unable to start program ‘D:\Work2006\CursorTest\bin\Debug\CursorTest.exe’.

Unmanaged debugging is not available.

尝试使用 ctrl+F5启动程序,并Attach 进程,SOS也不能加载,提示:

SOS not available while Managed only debugging.
To load SOS, enable unmanaged debugging in your project properties.

3. 在 Immediate window (Debug-> Windows -> Immediate)中输入 .load sos
在Immediate window中输入 immed 和 cmd 可在Immediate mode和Command mode之间切换

//—-调试 dump file
1. File 打开 dump file

2. Debug->Start 等待中断

3. 在Immediate window中输入 .load sos

常用命令
!EEVersion
!ProcInfo
!ClrStack
!Help <command>
!

Comments »

The URI to TrackBack this entry is: http://recordsome.blogsome.com/2006/06/06/p91/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.






















Get free blog up and running in minutes with Blogsome
Theme designed by Hadley Wickham