-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using --inspect
wait a little bit for inspector connection at program start
#13664
Comments
@dsherret do you need help with this issue? |
@bartlomieju I looked into this today tried implementing the suggestion about using a channel, but this isn't possible because then no code polls for new sessions. As a test, I tried doing just a spin loop polling for connections and it didn't work either because I think the breakpoints hadn't been set yet. Anyway, this looks like a bigger change than I expected and maybe we should do the other refactors you were going to do first. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Not stale? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
I would be very interested in an option for this. It's annoying when breakpoints aren't hit because they're too "early". I also found it very confusing at first why the debugger did not stop on a small program. |
@dsherret with recent refactor of inspector it should now be possible to implement it. The question remain how long should we wait before starting to execute code? 100ms seems to short... |
Is there a way to potentially have a |
We'd prefer to do I'm going to close this issue. |
@dsherret thanks, for some reason I thought that other issue was actually in a different repo, glad we are of like minds. Thanks! |
See denoland/vscode_deno#557 and past issue #12417
When debugging a small program it might execute and close before vscode connects. This leads to a poor user experience where vscode just keeps waiting to connect, but deno has already finished. There's no indication in the UI about what's going on and it's confusing.
To mitigate (not entirely prevent) this scenario, we could introduce a small delay at program start that delays for X milliseconds or until a connection is established. This delay should be long enough to eliminate this issue happening on most machines, but short enough that nobody would really notice it (especially people who are attaching a debugger after launching). We could perhaps even make this delay take into account the amount of time that's elapsed since deno started so it would likely only be hit for small programs.
The text was updated successfully, but these errors were encountered: