Why does Visual Studio 2008 skip over my break points?

前端 未结 13 2205
旧巷少年郎
旧巷少年郎 2020-12-20 22:20

I am running Visual Studio 2008 with SP1. When I debug an application, it will skip over my break points.

For example, I have two lines of code, each call a method.

13条回答
  •  情书的邮戳
    2020-12-20 22:52

    In addition to the above methods, I've also come across another couple of circumstances where breakpoints aren't hit:

    • The source is from a different directory tree. This can happen if you've renamed the directory, as paths are hardcoded into the pdb files. This caught me out when I had a trunk and branch dir that I swapped around and VS opened files in the other directory.
    • If the exe is still running in the background, which can sometimes happen if the app doesn't exit cleanly or somehow mspdbsrv.exe is still attached to it, so check your process list. Restart Visual Studio often fixes this.

提交回复
热议问题