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

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


The solutions in my case was to change build properties of the project.

Project properties -> Build -> Advanced (button) - Debugging information (select box) -> FULL.


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.


@eridanix has the right solution however if you are using VS code or editing the project file by hand you can insert the following into the project file XML, which is what selecting the FULL option via the GUI is doing.

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">  <DebugType>full</DebugType>  <DebugSymbols>true</DebugSymbols></PropertyGroup>

If you need the full PDB for other configurations you will need to add those as appropriate