2

Using firebug for Firefox, I can set a breakpoint in my JS code, refresh the page and the code will automatically pause at my breakpoint (my code runs on page load).

When I do the same in Chrome Developer Tools (Ctrl + Shift + J), it does not stop at the breakpoints. How do I get the code to stop at the breakpoints?

Also, my console.logs appear in firebug for Firefox, but not in the Chrome console. How do I get the Chrome console to display my console logs?

AlexMA
  • 9,842
  • 7
  • 42
  • 64
fortuneRice
  • 4,214
  • 11
  • 43
  • 58
  • Both of those should happen automatically when the dev tools are open. If not you may have a messed up Chrome install. If you manually type `console.log('test log')` in the console does it print `test log`? – abraham Mar 21 '12 at 18:42

1 Answers1

2

Breakpoints work for me; Press Ctrl-shift-i, click the Scripts tab, select the script that you want, then click on the line number where you would like to set the breakpoint. Breakpoints may be disabled; make sure that the button on the right side of the Scripts tab (next to step over, step out, and step in buttons), shows a line through it.

If this isn't working for you, try restarting the browser, disabling extensions, creating a test HTML page,, etc.

AlexMA
  • 9,842
  • 7
  • 42
  • 64