Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After updating to vs2017.3, the breakpoints will not be hit

We have an asp.net core 2.0 project (migrated from 1.x) running on Vs2017.3 (updated from 2017.2).

After the update, breakpoints stop being hit. Vs reports that "The breakpoint will not currently be hit. The source code is different from the original version".

Things were normal before updating and migration. The problem can be seen after updating to 2017.3 and before migrating to asp.net core 2.0.

I know about the workaround: To right-click and force the breakpoint to be hit even when the source codes are different. I need a solution.

Clean-rebuild has no effect. The problem occurs on multiple computers.

like image 403
Alireza Avatar asked Aug 19 '17 08:08

Alireza


2 Answers

I lost 30 minutes reading and trying solutions. My case was completely different and the solution was very easy. I just had to change the project to Debug. I do not know how the value changed to Release. With VS2017, right click on the solusion then / properties / Configuration properties / Configuration, change the projects to Debug.

like image 191
Danilo Venegas Avatar answered Oct 19 '22 22:10

Danilo Venegas


Another solution that worked for me and was not listed here was the following:

  1. Open the modules window via Debug > Windows > Modules (or press Ctrl + Alt + U)
  2. Look for your project and check the status (probably says 'Not Loaded')
  3. Right click the project and click load symbols, from here you will have to specify the location of the .pdb file from which to load the symbols.

Boom! You should be able to set breakpoints once again!

like image 39
Zach Pedigo Avatar answered Oct 19 '22 21:10

Zach Pedigo