Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug JavaScript in Visual Studio 2010?

Currently I am debugging my JavaScript using Firebug for Firefox. Is there anyway to debug javascript in Visual Studio 2010? The JavaScript isn't part of any Visual Studio project, it's just a .js file that will be linked to a static HTML page (it's to debug school assignments).

I did try searching and the results weren't any more recent than around a year ago. I'm hoping something has changed or there is a better workflow than notepad++ for HTML/JavaScript and Firebug for debugging.

like image 385
Pete Avatar asked Mar 24 '11 01:03

Pete


People also ask

How do I debug JavaScript script?

In the debugger window, you can set breakpoints in the JavaScript code. At each breakpoint, JavaScript will stop executing, and let you examine JavaScript values. After examining values, you can resume the execution of code (typically with a play button).

How do I enable JavaScript debugging in Visual Studio code?

Open the extensions view (ctrl+shift+x) and search for @builtin @id:ms-vscode. js-debug. Right click on the JavaScript Debugger extension and select Switch to Pre-Release Version . Reload VS Code.


1 Answers

Use the JavaScript debugger keyword in IE.

function onClickRow(detailUrl) {     debugger; } 

When run your page in IE, a debug window will pop up, then select Visual Studio 11.

like image 173
airbai Avatar answered Sep 17 '22 15:09

airbai