Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you launch the JavaScript debugger in Google Chrome?

When using Google Chrome, I want to debug some JavaScript code. How can I do that?

like image 343
Kevin Driedger Avatar asked Sep 15 '08 20:09

Kevin Driedger


People also ask

How do I start JavaScript debugging?

Normally, you activate debugging in your browser with F12, and select "Console" in the debugger menu.

How do I debug JavaScript embedded in Chrome?

If your application is running in the development mode on localhost , you can start debugging it from the built-in Terminal ( Alt+F12 ), from the Run tool window, or from the Debug tool window. Just hold Ctrl+Shift and click the URL at which the application is running. Set the breakpoints in your code.


1 Answers

Try adding this to your source:

debugger; 

It works in most, if not all browsers. Just place it somewhere in your code, and it will act like a breakpoint.

like image 101
Omer van Kloeten Avatar answered Oct 28 '22 03:10

Omer van Kloeten