I'm using chrome for a new website, and I'm doing some javascript debugging. One of my favorite techniques to debug nested expressions is to put a breakpoint, enter an expression in firebug's input panel in the console tab and press run. But I don't see this feature in chrome. I'm probably overlooking something. Is it there? And where can I find it.
Asked
Active
Viewed 4,190 times
3 Answers
7
You can do it right from this page: Hit CTRL+SHIFT+J, click the Sources tab, choose chromes-alternative-for-firebug-evaluation-console from the file drop down on the left, click on line 41 to create a break point. Now refresh the page and your breakpoint will stop the debugger.

Ruan Mendes
- 90,375
- 31
- 153
- 217
-
Is there a way to get user input from the console (like what Java's scanner class does?) – Anderson Green Aug 27 '12 at 16:20
-
@AndersonGreen Please do not hijack questions, you should ask a new question so that others can search for it and benefit from the answer – Ruan Mendes Aug 27 '12 at 16:31
-
Here's the relevant question: http://stackoverflow.com/questions/8299356/how-to-get-input-from-chromes-javascript-console – Anderson Green Aug 27 '12 at 16:34
4
Ctrl + Shift + I will open Chrome's Developer's Tools. Or (Chrome v9): Options -> Tools -> Developer Tools. Ctrl + Shift + J is a keyboard shortcut for the Javascript console.
Under the Scripts tab, you can click on the line number to set a breakpoint.

Harmen
- 22,092
- 4
- 54
- 76
1
You can also try right clicking on the page and choosing "Inspect Element" which should open the developer tools for you. Then you can click the Scripts tab like Harmen said.

sholsinger
- 3,028
- 2
- 23
- 40