How to use the Firefox debugger command for JavaScript

Source: Internet
Author: User

Install Firebug First, search for installation in Firefox extensions.
Then, in the page, enable the script in Firebug:

Then add the debugger command in some places on the page, such as the following page code:

<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8" /><title>JS Popup New Window</title><Scripttype= "Text/javascript">    functionopen_new (obj) {Debugger; window.open (Obj.href,'Search','width=400,height=300,left=500,top=500,scrollbars,resizable'); }</Script></Head><Body>    <ahref= "Http://www.baidu.com"onclick= "open_new (this); return false;">go to Baidu to search! </a></Body></HTML>

When the mouse clicks the link, the Open_new () function is executed, and the function contains the debugger command, so it is interrupted in this place. You can stop to see the values of some variables, or choose to continue execution.

How to use the Firefox debugger command for JavaScript

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.