-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(lsp): allow to connect V8 inspector #21482
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Addressed now. |
loop { | ||
if has_inspector_server { | ||
tsc_runtime_.lock().await.run_event_loop(PollEventLoopOptions { | ||
wait_for_inspector: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to set this to false
, otherwise run_event_loop()
won't return when there's an inspector attached and requests can't be processed.
The consequence is that the event loop only ticks after requests. So for example when starting and stopping the profiler it freezes, and you have to unfreeze it by interacting with your editor a bit to trigger some requests. Seems to finally be in a usable state besides that. The REPL also works with the same caveat.
It would help to have a cancel-safe JsRuntime
method to continuously drive the inspector message loop instead of run_event_loop()
here. Dunno if it's possible.
This commit adds a way to connect to the TS compiler host that is run as part of the "deno lsp" subcommand. This can be done by specifying "DENO_LSP_INSPECTOR" variable. --------- Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
This commit adds a way to connect to the TS compiler host that is run
as part of the "deno lsp" subcommand. This can be done by specifying
"DENO_LSP_INSPECTOR" variable.