To debug JavaScript in Visual Studio, follow the below-given steps −
Now, go to START and type Internet Options.
Above, uncheck both the options for Disable script debugging.
Click Apply, and then Ok.
Now set breakpoints in your JS file.
After that press the debug button in Visual Studio.