Skip to content

Conversation

bartlomieju
Copy link
Member

Based on denoland/deno_core#1193.

This commit rewrites 3 parts of the system to use a new "sync"
V8 inspector API exposed by deno_core:

  • REPL
  • coverage collection
  • hot module replacement

Turns out the async abstraction over V8 inspector was unnecessary
and actually greatly complicated usage of the inspector.

Towards #13572
Towards #13206

bartlomieju added a commit to denoland/deno_core that referenced this pull request Sep 16, 2025
Required for denoland/deno#30743

This commit changes `LocalInspectorSession` to only provide a
sync API.

While it might feel counterintuitive, as it is now the callers
responsibility to handle request/response cycles, this change actually greatly
simplifies inspector implementation and gives granular control
over behavior of inspector. The main change is that sync sessions, no
longer require event loop ticks to make progress - ie. sending a message
is fully synchronous - because there no channels involved. This leads
to the fact that "responses" (which are actually callbacks) are most
often produces when the message is sent and returned. 

Thanks to this change, it's now possible to easily implement
interactions with V8 coverage collection and profiler inspector domains.
@bartlomieju
Copy link
Member Author

@petamoriken this PR updates deno_core including APIs you added

@bartlomieju bartlomieju merged commit 9399f7b into denoland:main Sep 17, 2025
19 checks passed
@bartlomieju bartlomieju deleted the sync_inspector_session branch September 17, 2025 14:11
Tango992 pushed a commit to Tango992/deno that referenced this pull request Sep 24, 2025
Based on denoland/deno_core#1193.

This commit rewrites 3 parts of the system to use a new "sync"
V8 inspector API exposed by `deno_core`:
- REPL
- coverage collection
- hot module replacement

Turns out the async abstraction over V8 inspector was unnecessary
and actually greatly complicated usage of the inspector.

Towards denoland#13572
Towards denoland#13206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants