Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7698779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:19:19+00:00 2026-05-31T22:19:19+00:00

Windows 7 Firefox 10.0.1 I have simple setTimeout logic that I want to test

  • 0
Windows 7
Firefox 10.0.1

I have simple setTimeout logic that I want to test using Firebug debugger with few breakpoints.

test.js

console.log("one");   
setTimeout(function(){ console.log("hmm"); }, 5000);
console.log("two");   //breakpoint here
console.log("three");

test.html

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>

        <script type="text/javascript" src="../js/test.js" ></script>

    </head>
    <body>
        <h1>Hello World!</h1>
    </body>
</html>

Using Firebug debugger, I put breakpoint in the commented line (where console.log(“two”) )
and when I load the html page I get output:

one

and process halt at the breakpoint as expected but setTimeout never gets executed.

Is this firebug debugger bug? Has anyone seen this before?

UPDATE:

I investigate bit more and found:

If you click on “continue” during debugger mode and go through breakpoints within 5000ms (which is specified time in setTimeout), the “hmm” msg shows up.

If you halt at breakpoint for more than 5000ms then “hmm” msg won’t show up even after “continue” button.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:19:20+00:00Added an answer on May 31, 2026 at 10:19 pm

    setTimeout triggers only after Javascript execution thread becomes free, even if the time is out while thread is busy. Putting a break point just suspends the thread and it stays busy while stoppend on it. So, this code will return

    one
    two 
    three
    hmmm //(in 5 seconds, if no breakpoint, at once if you stop at a breakpoint for more than 5 seconds and then run the code further)
    

    This is the correct setTimeout behaviour.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to close parent window in Firefox 2.0 using JavaScript. I have
using target=_blank in the navigateToUrl with Firefox on Windows it opens in new tab,
I'm working on a Firefox extension where I'll want to keep multiple windows in
When I load jQueryUI on a Windows XP machine using Firefox 3.6.3, I get
I'm writing a server running as a Windows service that by request invokes Firefox
I have designed a stylesheet/javascript files bundler and minifier that uses a simple cache
I have a very simple and classic installation: Windows 7 WampServer with PEAR (PHP
Have A really simple form that isnt sending any data back to my controller.
We have some code that must access low level windows XP os calls which
I have created a JApplet using the JUNG library in Netbeans that compiles and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.