{"id":10168,"date":"2014-08-06T09:08:08","date_gmt":"2014-08-06T14:08:08","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=10168"},"modified":"2014-08-06T09:08:08","modified_gmt":"2014-08-06T14:08:08","slug":"step-through-javascripts-with-firefox-developer-tool-debugger","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=10168","title":{"rendered":"Step Through JavaScripts with Firefox Developer Tool Debugger"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Step_Through_JavaScript_Code\">Step Through JavaScript Code<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Start_Debugger\">Start Debugger<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Set_Break_Point\">Set Break Point<\/a>\n\t\t\t<\/li>\n<\/ol>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Step_Through_JavaScript_Code\"><h2>Step Through JavaScript Code<\/h2><\/span>\n<span id=\"Start_Debugger\"><h3>Start Debugger<\/h3><\/span>\n<p>* Start Firefox and browse to your page<br \/>\n* Open Firefox Developer Tool with one of following two methods:<br \/>\n&#8211; Press <em>F12<\/em><br \/>\n&#8211; Select <em>Tools > Web Developer > Debugger<\/em><\/p>\n<span id=\"\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_open_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_open_1-300x282.jpg\" alt=\"js_debugger_open_1\" width=\"300\" height=\"282\" class=\"aligncenter size-medium wp-image-10169\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_open_1-300x282.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_open_1.jpg 444w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Set_Break_Point\"><h3>Set Break Point<\/h3><\/span>\n<p>* Reload your page by pressing <em>F5<\/em><br \/>\n* Find and select you JavaScript source file, e.g. <em>common.js<\/em><br \/>\n* Click the line number where you want to set break point<\/p>\n<span id=\"_1\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_setBreak_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_setBreak_1-300x146.jpg\" alt=\"js_debugger_setBreak_1\" width=\"300\" height=\"146\" class=\"aligncenter size-medium wp-image-10170\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_setBreak_1-300x146.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_setBreak_1.jpg 641w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Reload your page by pressing <em>F5<\/em> again<br \/>\n* Web page will stop at your break point<br \/>\n* Click the pause icon:<\/p>\n<span id=\"_2\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_stepthru_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_stepthru_1-300x148.jpg\" alt=\"js_debugger_stepthru_1\" width=\"300\" height=\"148\" class=\"aligncenter size-medium wp-image-10171\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_stepthru_1-300x148.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_stepthru_1.jpg 642w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Step through icons are enabled:<\/p>\n<span id=\"_3\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_stepthru_2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_stepthru_2.jpg\" alt=\"js_debugger_stepthru_2\" width=\"146\" height=\"63\" class=\"aligncenter size-full wp-image-10174\" \/><\/a><\/h6><\/span>\n<p>* You can now step over, step into, step out your Javascript code<br \/>\n* Inspect variables:<br \/>\n&#8211; Local variable (Function scope) values<br \/>\n&#8211; Global variable (Global scope) values<\/p>\n<span id=\"_4\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_stepthru_variables_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_stepthru_variables_1-234x300.jpg\" alt=\"js_debugger_stepthru_variables_1\" width=\"234\" height=\"300\" class=\"aligncenter size-medium wp-image-10172\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_stepthru_variables_1-234x300.jpg 234w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/08\/js_debugger_stepthru_variables_1.jpg 307w\" sizes=\"auto, (max-width: 234px) 100vw, 234px\" \/><\/a><\/h6><\/span>\n","protected":false},"excerpt":{"rendered":"<p>Step Through JavaScript Code Start Debugger * Start Firefox and browse to your page * Open Firefox Developer Tool with one of following two methods: &#8211; Press F12 &#8211; Select Tools > Web Developer > Debugger Set Break Point * &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=10168\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[18],"tags":[504,496],"class_list":["post-10168","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-debugger","tag-javascript-2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-2E0","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/10168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10168"}],"version-history":[{"count":3,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/10168\/revisions"}],"predecessor-version":[{"id":10176,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/10168\/revisions\/10176"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}