Why the debugger doesn't work

后端 未结 15 1203
遇见更好的自我
遇见更好的自我 2020-12-17 09:48

My debugger is not working,
I\'m putting a breakpoint, but in run, time visual studio doesn\'t stop on the breakPoint.
How to fix it?
There is n

相关标签:
15条回答
  • 2020-12-17 10:02

    You might need to set your application in web config so that it can be debugged..

    <system.web>
        <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
    
    0 讨论(0)
  • 2020-12-17 10:10

    I've seen the already existing answers have listed many possible causes, but I'd like to add one more: if you're using post-compilation tools (such as ILMerge), check whether those tools keep your debugging information (is there a .pdb file? or maybe you have embedded it in your compilation output). For those ones who are actually using AfterBuild tasks in their .csproj I really suggest to check out.

    0 讨论(0)
  • 2020-12-17 10:10

    Are you debugging using IIS Express instead of IIS Local. I found IIS Express sometime won't hit debug points, IIS Local works fine.

    0 讨论(0)
  • 2020-12-17 10:12

    Find below the steps that solved my problem:

    1. Delete ASP.NET temporary files from C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
    2. Change build configuration to debug from project properties.
    3. Delete bin folder from your project.
    4. Check if compilation debug is set to true in the web.config
    5. iisreset
    6. Rebuild the project.
    0 讨论(0)
  • 2020-12-17 10:16

    You can enable Debug as below steps.

    1) Right click project solution
    2) Select Debug( can find left side)
    3) select Debug in Configuration dropdown.
    

    Now run your solution. It will hit breakpoint.

    0 讨论(0)
  • 2020-12-17 10:17

    try uncheck "Enable the Visual Studio hosting process" that in project properties -> debug worked for me

    0 讨论(0)
提交回复
热议问题