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