Visual Studio breakpoints not being hit

后端 未结 19 2099
再見小時候
再見小時候 2020-12-04 18:59

I\'m working with an ASP.NET MVC project that seems to be having some issues when attaching to the IIS process (w3wp.exe). I\'m running the solution and IIS 8.5 on my own lo

相关标签:
19条回答
  • 2020-12-04 19:15

    In my case the actual process was different from the original started process.

    Usually we bind the local-hosted services through the w3wp.exe process. In my case a custom process was used. Changing to that solved the problem.

    One more thing, change from Release to Debug mode. In release mode PDB files are not getting updated with breakpoints details. So make sure you are debugging your application in Debug mode.

    0 讨论(0)
  • 2020-12-04 19:19

    Go to Visual Studio Menu:

    Debug -> Attach to Process

    And then click the Select button, as in the image below:

    Attach to process

    Then make sure the "Automatically determine the type of code to debug" option is selected, like this:

    Select code type

    0 讨论(0)
  • 2020-12-04 19:21

    Right click on your project, then left click Properties, and select the Web tab. Debuggers > ASP.NET

    0 讨论(0)
  • 2020-12-04 19:22

    In Visual Studio 2017 you need to make sure you're not in release configuration mode.

    1. Open the build menu ddl
    2. Click configuration manager
    3. Change from 'release' to 'debug'

    0 讨论(0)
  • 2020-12-04 19:28

    One of my projects in my solution was set to Release mode. I changed it back to Debug mode, and the breakpoints are hitting now.

    0 讨论(0)
  • 2020-12-04 19:28

    If any of your components are Strong Named (signed), then all need to be. If you, as I did, add a project and reference it from a Strong Named project/component, neglecting to sign your new component, debugging will be as if your new component is an external one and you will not be able to step into it. So make sure all your components are signed, or none.

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