Conversation
Agent-Logs-Url: https://github.com/github/vscode-github-actions/sessions/5c79f4b5-d19e-4768-8821-d2721886fc0e Co-authored-by: rentziass <6207785+rentziass@users.noreply.github.com>
Add debugger build workflow and README install instructions
This is the first step toward bringing the Actions job debugging
experience into VS Code. The full vision is described in the ADR
(c2c-actions/docs/adrs/9758-actions-job-debugger-mvp.md): users will be
able to re-run a job with a debugger attached and connect their editor
to inspect variables, evaluate expressions, and run commands in the
job's runtime context — all through the standard Debug Adapter Protocol.
This PR adds the extension-side connect flow:
- A new command ('GitHub Actions: Connect to Actions Job Debugger...')
that prompts for a Dev Tunnel wss:// URL and starts a debug session.
- A WebSocket-based inline debug adapter (DebugAdapterInlineImplementation)
that speaks DAP-over-WebSocket directly to the runner — no local TCP
bridge needed.
- Authentication using the existing VS Code GitHub session token, sent
as a Bearer token on the WebSocket handshake.
The tunnel URL is entered manually for now. Once the server-side
endpoint that serves the debugger URL for a job is deployed, we can
automate this (and eventually add 're-run with debugger' directly from
the extension).
Security hardening:
- Tunnel URLs restricted to wss://*.devtunnels.ms only.
- Auth tokens kept in extension-private memory with cryptographic
nonces, never exposed through DebugConfiguration.
- Tunnel URL re-validated in the adapter factory (defense in depth).
- 30s connection timeout prevents indefinite hangs.
- WebSocket send/ping errors trigger clean session teardown.
- Debugger registration gated to Desktop VS Code (Node context).
Workarounds for VS Code quirks (to be removed as the runner evolves):
- Synthetic source references on stack frames so VS Code auto-focuses
the top frame and loads variables on connect/step.
- Buffering of early 'stopped' events that the runner sends before
VS Code completes the DAP handshake.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add 'Connect to Actions Job Debugger' command
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add debugger opt-in feature flag
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove debugger preview scaffolding
There was a problem hiding this comment.
Pull request overview
Ports the GitHub Actions “job debugger” functionality from the debugger branch into main, gated behind the github-actions.debugger.enabled setting and Desktop VS Code, by adding a custom debug type that connects to a runner bridge over a WebSocket DAP transport.
Changes:
- Adds a new debug type (
github-actions-job) with a “Debug Running Job…” command and activation events. - Implements the debugger connect flow (job URL parsing, API call to fetch tunnel URL, token nonce handling) and a DAP-over-WebSocket inline debug adapter.
- Adds configuration handling for the preview setting (including a reload prompt) plus URL validation utilities with unit tests.
Show a summary per file
| File | Description |
|---|---|
| src/extension.ts | Wires debugger registration/guard into extension activation (Desktop + setting gated). |
| src/debugger/debugger.ts | Implements command + debug type plumbing (configuration provider, adapter factory/tracker, connect flow). |
| src/debugger/webSocketDapAdapter.ts | Inline debug adapter that transports DAP JSON messages over a WebSocket. |
| src/debugger/tunnelUrl.ts | Validates returned tunnel URLs against a strict allowlist. |
| src/debugger/tunnelUrl.test.ts | Unit tests for tunnel URL validation. |
| src/debugger/jobUrl.ts | Parses/validates GitHub Actions job URLs and derives expected host from API URI. |
| src/debugger/jobUrl.test.ts | Unit tests for job URL parsing/host mapping. |
| src/configuration/configuration.ts | Adds isDebuggerEnabled() and prompts reload when the setting toggles (Desktop only). |
| package.json | Declares debug type + command and adds ws dependency. |
| package-lock.json | Locks ws / @types/ws additions. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 9/10 changed files
- Comments generated: 4
AllanGuigou
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This bring the debugger capability from the debugger branch into main, gated behind the
github-actions.debugger.enableduser setting.