1

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)

enter image description here

Robert Smith
  • 634
  • 1
  • 8
  • 22
  • Check [this setting](https://msdnshared.blob.core.windows.net/media/2016/11/debugger-settings-1024x690.png) – stuartd Oct 31 '18 at 17:45
  • Stuart, thanks for your help! It looks like it was set that way, please take a look at the update. – Robert Smith Oct 31 '18 at 17:52
  • Check https://stackoverflow.com/questions/2155930/how-do-i-remedy-the-the-breakpoint-will-not-currently-be-hit-no-symbols-have-b and also https://stackoverflow.com/questions/2468852/the-breakpoint-will-not-currently-be-hit-the-source-code-is-different-from-the. – Rui Jarimba Oct 31 '18 at 18:25
  • Rui, I saw those links. However those are for a different error. I did try those suggestions in any case but they did not help. Thank you. – Robert Smith Nov 01 '18 at 11:57
  • Any update I am facing issue same issue. – Dnyati Nov 25 '19 at 10:23

0 Answers0