Receiving the following error:
The breakpoint will not currently be hit. No executable code of the debugger's target code type is associated with this line. Possible causes include: conditional compilation, compiler optimizations, or the target architecture of this line is not supported by the current debugger code type.
The same error happens on any MVC project, even if I create a brand new project for testing this issue. The error is when I set a breakpoint on any javascript line in my .cshtml files. For example, I receive this error if I set a breakpoint on "alert" below:
<script type="text/javascript">
alert('test');
</script>
Environment: Windows 7 64bit, VS2017 15.8.8, Framework 4.6.1, MVC Empty application. Create one controller and one view, add this code to the bottom of the view:
<script type="text/javascript">
alert('test');
</script>
Then I receive the error when I start debugging, the error shows on the breakpoint circle for that line.
Settings: (All default settings, nothing has been modified)
- Define DEBUG Constant is checked
- Define TRACE Constant is checked
- Advanced-Debugging information is full
I have tried rebooting the machine with no help. Everything was working fine a couple of days ago.
Update: (Here is a picture of debug settings)