几千年没写随笔了,今天做VS。NET开发遇到DEBUG调试失败,找到了解决方案,在这留着以后有用呢。

自己的解决方案。
1、把RELEASE变为DEBUG
2、enabled debugging ASP.NET为true
3、把目录下的BIN和OBJ目录删除掉,然后再生成一遍。(因为BIN和OBJ里面的PDB文件保存了调试的信息的)
4、再不行就重新注册一次IIS看看。
5、'Generate Debugging Information'

不行就参考以下资料。


It sounds like the symbols you have are not lining up with the binaries
you're generating. Do the following:

1. Verify that you are in debug mode and not release mode.
2. Verify that the timestamp of the .pdb file is the same as the .dll or
.exe that you're generating. If they are not, remove all of the binaries
and recompile your entire solution.
3. If the additional assemblies you are trying to debug are not part of
your solution (i.e. other projects), go under the properties for the
solution and be sure to include the "Debug Source Files" and "Debug
Symbol Files" locations of the additional assemblies you're trying to debug.

 

 

there are 4 points to look for :

1/uninstall and reinstall your aspnet process
aspnet_regiis -u to uninstall
aspnet_regiis -1 to reinstall

2/check if you're not in realease mode for all projetcs in your solution

3/in the project properties options check if "enable ASP.NET debugging" is set to true

4/ and the very last one not found in previous posts
in the project properties options : "common properties/general/startup object"
it must be set to "not set"

if you set it to your startup page it wont work and aspnet won't be abble to load all debugging informations in the pdb file.

comment : this works for the C# projects, didn't checked with other languages.

你可能感兴趣的:(debug)