Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/vscode/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ One extension replacing the standalone `rstack.rslint` and `rstack.rstest` exten

10. **Test file ownership** (test) — publication mirrors the CLI per project. When a request carries the same file or the same case from several projects (merged gutter, run-at-cursor, run-current-file; all three profiles reach `startTestRun`), only items of the deepest project root run and the others are reported skipped to clear stale merged gutter state — implemented in `runRouting.ts`, `index.ts` (`startTestRun`), and `master.ts` (`RstestApi.project` made public). Explicit single-project selections, project/folder/Run All, and `rstack.rstest.runInTerminal` (VS Code supplies one explicitly picked item) keep CLI scope.

11. **Debugger-owned test processes** (test) — debug runs use js-debug `launch` with child-process auto-attach instead of upstream's `--inspect-wait` plus `attach`. js-debug owns inspector endpoints and process teardown; `debuggerPort` / `debuggerAddress` are removed without migration. `debugWorker.ts` owns the session and a debug-only local socket carrying JSON birpc messages (`shared/socketRpc.ts`) after a first-line per-launch secret authenticates the worker; normal runs retain Node IPC. Preserve the 9229-occupied breakpoint and continue/cancel/stop cleanup regression in `e2e/rstest/suite/debug.test.ts` when syncing.
11. **Debugger-owned test processes** (test) — debug runs use js-debug `launch` with child-process auto-attach instead of upstream's `--inspect-wait` plus `attach`, and `pauseForSourceMap: true` lets TypeScript breakpoints bind before in-memory test bundles execute. js-debug owns inspector endpoints and process teardown; `debuggerPort` / `debuggerAddress` are removed without migration. `debugWorker.ts` owns the session and a debug-only local socket carrying JSON birpc messages (`shared/socketRpc.ts`) after a first-line per-launch secret authenticates the worker; normal runs retain Node IPC. Preserve the 9229-occupied breakpoint and continue/cancel/stop cleanup regression in `e2e/rstest/suite/debug.test.ts` when syncing.

12. **Function-title discovery** (test) — `stacks/test/parserTest.ts` replaces upstream's scope pre-pass with walk-order bindings and assignment tracking for runtime-name parity. Unbound identifiers (including default imports) and non-computed members use best-effort identifier/property names rather than giving up with `unnamed test`; known unknown bindings still stay unnamed. Re-apply this adaptation when syncing `parserTest.ts`, preserving the upstream tests and local runtime-parity cases.

Expand Down
2 changes: 2 additions & 0 deletions packages/vscode/src/stacks/test/master.ts
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,8 @@ export class RstestApi {
cwd: this.cwd,
env: workerEnv,
autoAttachChildProcesses: true,
// In-memory test bundles can execute before TS breakpoints bind with js-debug's Node default (#79).
pauseForSourceMap: true,
skipFiles: getConfigValue('debugExclude', this.workspace),
...(debugOutFiles.length ? { outFiles: debugOutFiles } : {}),
},
Expand Down
1 change: 1 addition & 0 deletions packages/vscode/tests/stacks/test/master.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,7 @@ describe('Rstest public API', () => {
DEBUG_ONLY: 'yes',
RSTEST: 'true',
},
pauseForSourceMap: true,
skipFiles: ['**/vendor/**'],
outFiles: ['**/compiled/**/*.js'],
});
Expand Down
Loading