Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The breakpoint will not currently be hit - No executable code is associated with this line

I have a problem to debug my ASP.NET Core 2 application. Suddenly all breakpoints in application cannot be hit.

The breakpoint will not currently be hit. No executable code of the debugger's target is associated with this line.

The message in tooltip on breakpoint after debugging start is:

The breakpoint will not currently be hit. No executable code is associated with this line. Possible causes include: conditional compilation or complier optimizations, or the target architecture of this line is not supported by the current debugger code type.

like image 608
eridanix Avatar asked May 12 '18 13:05

eridanix


1 Answers

The solutions above did not work for me on VS 2019 Version 16.8.3 targeting Core 3.1 or Net5. I cannot get breakpoints to work on JaveScript in *.cshtml files. Breakpoints set on Razor script does work in .cshtml though. For JS, the only workaround I've found is moving Java Script to .js files. The breakpoints work in *.js files as expected - for me anyway.

like image 189
WillM Avatar answered Sep 18 '22 13:09

WillM