• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 711
  • Last Modified:

Debugging JavaScript with firebug

Hey folks,

I was curious if anyone might know of a way to set a dynamic breakpoint or figure out a way to narrow down what in my javascript is changing the innerText (or textContent for FF) for a specific anchor element. Setting random break points isn't efficient when dealing with 2,000 lines of javascript and I'm not entirely sure what particular statement is changing the text. I'd like to be able to narrow it down. Is there a way I can use some clever Watch point in Firebug or perhaps adding an expression to break points somewhere?

1 Solution
b0lsc0ttIT ManagerCommented:

I don't know of a way to make "dynamic" break points but in cases like this I set one and then use the F11 key to step into it.  If you really have no idea of where the problem is then I will usually use Alerts (or something like them) to narrow it down for me.  With a few properly placed ones it can usually narrow the problem down to a much smaller block.

Let me know if you have any questions or need more information.

I think you can use the console.trace()  of the firebug.

take a look http://www.getfirebug.com/logging.html
Forced accept.

EE Admin

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now