Reputation: 2842
I would like to execute every code step by step after the debugger
keyword in Firebug. In the following example JSFiddle the execution halts when the form is clicked because of the debugger
keyword in the onclick attribute. Subsequently I click Step Into in Firebug but instead of showing the jQuery code, it shows nothing... How to make Firebug halt at the jQuery code?
<form method="get" onclick="debugger">
<input type="text" name="q" value="">
<input type="submit" value="Search Google">
</form>
jQuery code:
$('form').submit(function() {
document.title = "How to shown this line in debugger?";
return confirm('Are you sure you want to search Google?');
});
Upvotes: 1
Views: 425
Reputation: 42736
For Firebug
Go to the Script panel
Click the dropdown for the scripts and select the script you need
Add a breakpoint on the line you want to start debugging from
For Chrome
Then to the Sources tab
Click "show navigator" button
Select the script
Click the line number you wish to debug from
Upvotes: 3