Breakpoint Failed to Bind - Visual Studio 2015
I had the same problem but a different solution.
Please note I updated to VS 2015 Update 1 and the problem is still there.
In previous edition of VS starting debug automatically triggered a build in debug mode. But with VS2015 it does not.
So if your last build was in release mode, and you try debugging, breakpoint won't work.
You have to manually build in debug mode first, then start debugging.
Breakpoint failed to bind error when debugging .NET framework code?
This is resolved now - I had to turn off JIT optimizations in Visual Studio 2015, since the core .NET libraries are released with optimizations.
https://blogs.msdn.microsoft.com/devops/2015/08/14/debugging-optimized-code/
Visual Studio 2015 Update 1 C++ The breakpoint failed to bind
The issue was in latest Windows 10 build (14251) After reverting to 11099 it all started to work again.
Breakpoints can't be set on certain lines in the method. Quickwatch not working for some variables
In Debug->Windows->Modules I noticed that Optimized was "Yes"
for the module I was trying to Debug.
The solution is:
Right-Click on the module and choose Symbol Settings. Under General select the option for "Suppress JIT Optimization on module load (Managed Only)
".
This option can also be found under Tools->Options->Debugging->General.
Visual Studio 2015 does not hit breakpoint when debugging WF workflow
Solved by disabling "Just my code" in debug settings. In my opinion the workflow is "my code" though...
Visual Studio 2022 Unable to set breakpoint on function header due to UI
Under Debug->Options->Text Editor->C#->Advanced
If you scroll to the very bottom, and uncheck "Combine inheritance margin with indicator margin, you are now able to set breakpoints again at the function level.
After unchecking the thing above, now can set breakpoints at the function header, and keep the inheritance margin feature:
Visual Studio not hitting breakpoints that should always be hit + problems binding breakpoints in running code
Solved:
Debug Menu -> Options -> Debugging -> General -> Uncheck Suppress JIT optimization on module load
I'm not sure why it decided to start acting up now(haven't had this problem for a year of work on this project), but I'm guessing the code I'm trying to debug was optimized away.
Related Topics
How to Serialize Internal Classes Using Xmlserializer
How to Get the Subscribers of an Event
How to Implement a Navigation Button in Shared Application Resources
How to Prevent a Single Object Property from Being Converted to a Datetime When It Is a String
C# Getting Value of Params Using Reflection
Prevent Textbox Autofill with Previously Entered Values
Creating an Mvvm Friendly Dialog Strategy
Get the Name of a Method Using an Expression
Encoding Xpath Expressions with Both Single and Double Quotes
How to Enable Nullable Reference Types Feature of C# 8.0 for the Whole Project
C# 4.0: How to Use a Timespan as an Optional Parameter with a Default Value
What's Difference Between Environment.Exit() and Application.Shutdown()
Linq: Passing Lambda Expression as Parameter to Be Executed and Returned by Method
Get Screen Resolution in Win10 Uwp App