Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Visual Studio 2017- The breakpoint will not be hit.What to do ?

If you run your website in Visual Studio 2017, with breakpoints set at different places, and you see that a breakpoint is hollow inside, and when you hover over it, it says that “The breakpoint will not be hit because no symbols were loaded”, try to reproduce it.

Let’s reproduce it.

First create a new ASP.NET website in Visual Studio 2017 and call it Reproducing DebugSymbols, as shown below:

Now remember that we are reproducing the issue, so right click on Solution, then on Properties, at the bottom:

The following Configuration Manager pop up will show:

Click on Configuration Manager button to the top right and set Configuration to Release.

Click on Close, then click on Ok.

Put a breakpoint in Default.aspx page in Page_Load. See below:

Hit Run, and even with Debug, with Any CPU selected,you will see the following screen, where breakpoint throws the famous message:

Now hit Stop red button at the top, do the same steps again but set Configuration Manager to debug,as shown below:

Hit again close and then ok.

Run the project again, without touching anything, you see that the breakpoint is hit, as shown below:

So, as you can see we have successfully reproduced “Debug Symbols Not Loaded” issue.

Changing to debug on the main Visual Studio Screen is not enough. We need to change the Debug configuration for Solution.



This post first appeared on Thoughts On Programming, please read the originial post: here

Share the post

Visual Studio 2017- The breakpoint will not be hit.What to do ?

×

Subscribe to Thoughts On Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×