Why would the debugger not be stopping at a breakpoint in my ASP.NET application?

前端 未结 15 2079
独厮守ぢ
独厮守ぢ 2020-12-05 12:46

I\'m trying to debug a large ASP.NET application.

I set a breakpoint on the first line in Page_Load in Default.aspx.cs.

When I start the application, my

相关标签:
15条回答
  • 2020-12-05 13:32

    People.... I found other solution for breakpoint dont stop. In Attach to Process window on Visual Studio 2010 and using Framework 3.5, by default automatically determines the code types to debug (v2.0, v1.1, v1.0) and (v4.0).

    Visual Studio gets confused and automatically determines 2.0 managed code as 4.0 managed code sometimes.

    In this case you need to click in "Select..." button on "Attach to" field and select Manage (v2.0, v1.1, v1.0).

    Regards

    0 讨论(0)
  • 2020-12-05 13:32

    This drove me nuts for a week until I finally noticed a missing setting. This builds on Jay Riggs's answer, but for Visual Studios 2010 instead of 2005. In project properties -> Web -> Debuggers, make sure that the ASP.NET debugger is checked.

    0 讨论(0)
  • 2020-12-05 13:35

    In my case, the issue ending up being related to both using full IIS (not Express) and having a debug build where it included full debug symbols but also had project properties, Build, Optimize code checked.

    Under Express, this works fine, but under full IIS this doesn't work. Visual Studio attaches to the w3wp process correctly, but it does not load symbols for the optimized dll. In Visual Studio you can go to Debug, Windows, Modules then scroll for the specific dll and see if under the Symbol Status column it shows Skipped Loading Symbols.. Right-click on it and select Load Symbols to make it work.

    One additional setting that can affect this is if Visual Studio is set to only debug user code under Debug, Options and Settings, Debugging, General, Enable Just My Code. When optimized, the dlls will be marked as not user code when running under full IIS, so when Just My Code is enabled any breakpoints in them will be skipped. You can either set VS to debug non-user code or set the build to not optimize to allow breakpoints to be hit.

    0 讨论(0)
  • 2020-12-05 13:37
    1. Go to your solution properties.
    2. Inside Configuration Properties,Set build configuration set to 'Debug' instead of 'release'for all projects in your solution.
    3. Click on Apply and then OK button.
    0 讨论(0)
  • VS Debug Problem with IE8

    Since this is my first post on Weblogs, I decided to write about a problem that has been opened frequently on the ASP.NET official forum which is the VS debugger crashes with IE8.

    I had answered the same problem 4 times, so I hope that some one will find this post very helpful if he is facing the same problem.

    How could the VS debugger crash with IE8?

    If you opened multiple instances of IE8 and you attempt to debug your project, you will mostly have the issue where the VS debugger just stops and ignores your break points!

    Why was that?

    IE 8 has a feature called Loosely-Coupled Internet Explorer (LCIE) which results in IE running across multiple processes. http://www.microsoft.com/windows/internet-explorer/beta/readiness/developers-existing.aspx#lcie

    Older versions of the Visual Studio Debugger get confused by this and cannot figure out how to attach to the correct process.

    To overcome this issue, you need to disable the process growth feature of LCIE by following the below steps:

    1) Open RegEdit 2) Browse to HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main 3) Add a dword under this key called TabProcGrowth 4) Set TabProcGrowth to 0

    If you run into the same problem on Vista or newer, you will also need to turn off protected mode.

    And then go ahead and start debugging your code :)

    0 讨论(0)
  • 2020-12-05 13:40

    Try doing a full rebuild on the application. Pay attention that it's in the "Debug" configuration.

    As far as I understand (but I'm not an expert in these things), this can happen when the debug info files (.PDB) are out of sync with the real compiled thing.

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