Search code examples
javascriptvisual-studio-debuggingvisual-studio-2017

Cannot create JavaScript breakpoints in Visual Studio 2017


I cannot insert breakpoints into JavaScript files in visual studio 2017. Anyone else having this issue and has anyone found a solution?

edit: The other questions were related to breakpoints not being HIT. I can't even insert breakpoints into JS to begin with. The option is not in the context menu in Visual Studio.

edit 2: Even if I create a brand new JS file (since this project was created in VS2015) I still can't insert a breakpoint. The option just isn't listed in the context menu.


Solution

  • I test it using a simple JavaScript app in VS2015 and VS2017 Enterprise version.

    It really has this menu item in VS2015, but not in VS2017:

    VS2015: enter image description here

    VS2017: enter image description here

    One workaround is that just as Jimmy's suggestion, use the F9 or add it in A with mouse in above screen shot.

    Other community members also submitted this feedback to the product team here:

    https://developercommunity.visualstudio.com/content/problem/25474/right-click-add-breakpoint-option-not-in-list.html