Javascript – How to launch the JavaScript debugger in Google Chrome

debugginggoogle-chromegoogle-chrome-devtoolsjavascript

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

Best Answer

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.