0

Is there a way to have the browser debugger (firebug or chrome) to break (stop at the executing line of code) as soon as any javascript code fires? (Not knowing where the line of code is) I know about break points. I just need the debugger to stop automatically at the place when a line of javascript executes

Glide
  • 20,235
  • 26
  • 86
  • 135

4 Answers4

0

there is button for that press Pause button on the firebug panel on left below the firebug two yellow vertical lines

enter image description here

NullPoiиteя
  • 56,591
  • 22
  • 125
  • 143
0

You should use a breakpoint for this.

Asad Saeeduddin
  • 46,193
  • 6
  • 90
  • 139
0

Just open the Script Tab in firebug, and click on the left of the line you want to put a break point at

enter image description here

If you need to stop the curent javascript execution (without knowing what's running), press the pause button:

enter image description here

Majid Laissi
  • 19,188
  • 19
  • 68
  • 105
  • Sorry I wasn't clear on my original question. **(Not knowing where the line of code is)** I know about break points. I just need the debugger to stop **automatically** at the place when a line of javascript executes – Glide Oct 23 '12 at 21:03
  • I don't understand `at a place when a line of javascript executes` and `I don't know which line`. So you want your javascript code to stop wherever it's executing when you click like a button or something ? – Majid Laissi Oct 24 '12 at 00:24
0

See this answer: How to set breakpoints in inline Javascript in Google Chrome?

and this answer (for Chrome): https://developers.google.com/chrome-developer-tools/docs/scripts-breakpoints

and finish up with this one for some interesting tips: http://www.andismith.com/blog/2011/11/25-dev-tool-secrets/

Community
  • 1
  • 1
Jason M. Batchelor
  • 2,951
  • 16
  • 25
  • Sorry I wasn't clear on my original question. **(Not knowing where the line of code is)** I know about break points. I just need the debugger to stop **automatically** at the place when a line of javascript executes – Glide Oct 23 '12 at 21:02
  • You mean, write something into your javascript that trips the debugger? I don't know that you can do that, without writing an actual error into your script, and turning on the various debugger's "pause on exception" feature. Firebug lets you do that, and so does Chrome. – Jason M. Batchelor Oct 23 '12 at 21:07