Visual Studio debugger slows down in in-line code

2019-07-18 01:17发布

Since I upgraded to Visual Studio 2008 from vs2005, I have found a very annoying behaviour when debugging large projects. If I attempt to step into inline code, the debugger appears to lock up for tens of seconds. Each time that I step inside such a function, there is a similar pause. Has anyone experienced this and is anyone aware of a work around?

Postscript:

After learning that MS had a service pack for vs2008 and needing to get it because of other compiling issues, the problem that I was encountering with the debugger was resolved.

4条回答
成全新的幸福
2楼-- · 2019-07-18 01:56

For what it's worth, this issue appears to be addressed in the visual studio 2008 service pack 1.

查看更多
Animai°情兽
3楼-- · 2019-07-18 01:58

I get delays like this when debugging ASP.NET apps and it seems to happen when a symbol(pdb) file is getting accessed in the background. The larger the library, the longer the wait. My delay is at most about 10 seconds, but it does seem to happen with symbols that have already been accessed.

I do get a lot of 1-3 second waits when i try to step over items that cause VS to give me the "Step into Specific" message (http://blogesh.wordpress.com/category/visual-studio-2008/ #3). Perhaps this may be causing a real blow up for you.

查看更多
兄弟一词,经得起流年.
4楼-- · 2019-07-18 02:02

I used to get this - I think it's a bug with the 'Autos' debug window:

http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/eabc58b1-51b2-49ce-b710-15e2bf7e7516/

查看更多
小情绪 Triste *
5楼-- · 2019-07-18 02:10

As a workaround, you could use something like this for debugging purposes:

#ifdef _DEBUG
  #define INLINE
#else
  #define INLINE inline
#endif

For extra neatness you can place the functions in a separate .inc file that is included either in the header or the cpp file depending on build type.

查看更多
登录 后发表回答