2

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>
1
  • Ive 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 Commented Nov 23, 2008 at 7:15

3 Answers 3

3

Check if you have "support for script debugging" enabled in Console. Its disabled by default for performance reasons.

Sign up to request clarification or add additional context in comments.

Comments

0

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

Even a simple alert('Hallo'), whisch is executed, and breakpoint set, the buttons are greyed out and no debugging
0

You need to close all instances of firefox and reopen. Firefox has shared memory, so you cannot open a new page.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.