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

  • SEARCH
  • Home
  • 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 7982779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:46:25+00:00 2026-06-04T10:46:25+00:00

I am implementing an interactive debugging facility for code running in a browser. When

  • 0

I am implementing an interactive debugging facility for code running in a browser. When I get to a “breakpoint” I need to invoke the debugger and wait for the required action that may of course include a “continue” command to go further with the execution of the script.

To do this I’ve written a small node.js webserver that handles those “debug” requests using a long polling technique. The debugger interface is running in another browser window and talks to the node.js webserver so commands can effectively sent to the script being debugged from the other browser.

The “halt” in the script being debugged is implemented using a synchronous request that takes at most N seconds in a for(;;) loop that can be exited when the command "cont" is received. If the programmer doesn’t send a command using the debugger interface within the limit the server automatically sends a “wait more” answer, and the script remains in the endless loop.

Everything works nicely, except that the browser (Chrome in this case) after a while pops up a dialog telling that the script being debugged is stuck and providing options for killing it. This happens no matter what is the value of N.

Is there a way to wait for the command without having the browser to kill the script? Can the timeout be changed?

Note that changing the script to use a callback logic like it’s normally done when programming in the browser is impossible (unless you’re talking about performing a full CPS transform on a generic program, and I don’t want to go there).

  • 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-06-04T10:46:27+00:00Added an answer on June 4, 2026 at 10:46 am

    There is no portable (cross-browser) way to prevent the browser to kill a script when it thinks that execution is taking too much and it’s not possible to start a nested event loop to implement blocking operations like it’s done normally in GUI libraries.

    A solution working for Chrome is just starting the browser with the option

    --disable-hang-monitor
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

implementing publishActivity in PHP using the REST API using this code: $activity = array(
When implementing the Strategy Pattern, where does one put the code that determines which
I need to draw a large, interactive tree structure in C# WinForms - a
Implementing the ScriptControlClass was extremely easy, unfortunately the side effects with the language implementation
Implementing a custom membership provider, there are certain properties such as MinRequiredPasswordLength that only
Implementing a simple Login screen using JSF and Spring and Hibernate. I have written
When implementing a class, is it better practice to return a value for methods
While implementing XML file reading/writing in my application I saw that when I call
When implementing the ISerializable interface in C#, we provide a constructor which takes a
In implementing faceted search, if the number of options is 7 or less, I

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.