I cannot seem to debug my JavaScript code with Firebug. The play button is greyed out. I use FireFox 3.0.4 and Firebug 1.2.1.
Are there any known issues?
This is the script I want to debug:
(breakpoints set on <img onclick> and function say()), the code executes well.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="jquery/jquery-1.2.6"></script>
<script type="text/javascript">
function say(text){
alert(text);
}
</script>
<title>DOM Level 0 Event Handlers</title>
</head>
<body>
<img onclick="say('Vroom vroom');" id="vstar" src="vstar.jpg" alt="vstar" />
<div id="console"></div>
</body>
</html>
3 Answers 3
Check if you have "support for script debugging" enabled in Console. Its disabled by default for performance reasons.
Comments
I usually see this behavior if I forget to set a break point, or I have set the break points in places that don't get executed (so execution never stops, so the play button would never do anything).
1 Comment
You need to close all instances of firefox and reopen. Firefox has shared memory, so you cannot open a new page.
ve never found a way to debug JS code thats embedded within a non .js file (JSP, HTML, etc.), so I`d be very keen to hear any solution to this problem