Step Through JavaScripts with Firefox Developer Tool Debugger

 

Step Through JavaScript Code

Start Debugger

* Start Firefox and browse to your page
* Open Firefox Developer Tool with one of following two methods:
– Press F12
– Select Tools > Web Developer > Debugger

js_debugger_open_1

Set Break Point

* Reload your page by pressing F5
* Find and select you JavaScript source file, e.g. common.js
* Click the line number where you want to set break point

js_debugger_setBreak_1

* Reload your page by pressing F5 again
* Web page will stop at your break point
* Click the pause icon:

js_debugger_stepthru_1

* Step through icons are enabled:

js_debugger_stepthru_2

* You can now step over, step into, step out your Javascript code
* Inspect variables:
– Local variable (Function scope) values
– Global variable (Global scope) values

js_debugger_stepthru_variables_1
This entry was posted in JavaScript and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.