views:

21095

answers:

4

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

+4  A: 

Not sure about this, but have you tried adding this to your source:

debugger;

Works in most, if not all browsers.

Omer van Kloeten
where exactly?can you give more info on that?Thank you,
squadette
you place the line inside your source code and it's the equivalent of a breakpoint.
Omer van Kloeten
+20  A: 

CTRL-SHIFT-J (also under the Page > Developer > Debug JavaScript menu item)

John Sheehan
I think the shortcut has since changed to CTRL-SHIFT-J.
Martijn Laarman
or Cmd-Shift-J for Macs. God I love this `<kbd>` tag. Too bad I can't use it in comments.
Anurag
+2  A: 

Ctrl+Shift+J Opens Developer Tools.

Senyai
A: 

It does not work in chrome at this point, apparently.

c-a
what 'it' do you mean, exactly?
Gregg Lind