Question

Lets say for example that I have a button and when I click on it a modal dialog opens on the screen, or I have a vertical navigation and when I click on an item, it shows all the sub-items of this one.

I was wondering if it's possible to preview on Firebug, which lines of code are executed and see the specific code of the JavaScript file?

What I'm looking for is a way of viewing the JS code that is executed in a similar way as Firebug does with CSS (by doing Inspect Element with Firebug on a tag and showing all CSS rules that are applied to this tag).

Was it helpful?

Solution

You can use the Script panel to view and debug your JavaScript code.

There are several ways of how you can debug your code:

  1. Setting a breakpoint
  2. Using the debugger keyword
  3. Using the Break On ... feature

In all these cases the script execution will stop at a specific line, from which you can step through each instruction to debug the code.

How you do that is described in more detail on the Firebug wiki page.

OTHER TIPS

you can debug (see) your js code.

In firebug Script panel is provided where you can select your js and attach debugger wherever you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top