Skip to content

Conversation

@minestarks
Copy link
Member

@minestarks minestarks commented Nov 17, 2025

Before this change, the "run" command (accessible via the "Run" code lens, the play button in the corner of the editor or the command palette) was simply invoking the debugger without any breakpoints.

The problem with this approach is that the debugger is slow relative to just running a program using the run() method in the WASM module. With the recent circuit tracing changes, the debugger is getting more heavyweight.

This PR decouples the "Run" command from the debugger. Instead, we create a VS Code terminal and direct the program output to that terminal.

As part of this change, I had to make some changes to error reporting, which happens to fix #149 .

The changes in error reporting and console output handling means that there are subtle updates to how Test Explorer and Copilot reports failed programs as well.

See below for a full UX comparison.

Before After
Run image image
Debug image image
Run (compile error) image image
Debug (compile error) image image
Run (runtime error) image image
Debug (runtime error) image image
Run (timeout) N/A image
Run (user cancellation) N/A image
Run (OOM/stack overflow) image image
Debug (OOM/stack overflow) image image
Copilot run image image
Copilot run (compile error) image image
Copilot run (runtime error) image image
Test Explorer (runtime error) image image

@minestarks minestarks force-pushed the minestarks/circuit-disable-tracing-vscode-run branch from 72b09eb to 337066a Compare November 18, 2025 00:47
@minestarks minestarks marked this pull request as ready for review November 18, 2025 00:54
Base automatically changed from minestarks/circuit-source-links to main November 18, 2025 01:45
Comment on lines +229 to +230
const compilerTimeout = setTimeout(() => {
worker.terminate();

Check notice

Code scanning / devskim

If untrusted data (data from HTTP requests, user submitted files, etc.) is included in an setTimeout statement it can allow an attacker to inject their own code. Note

Review setTimeout for untrusted data
@minestarks minestarks enabled auto-merge November 24, 2025 22:45
@minestarks minestarks added this pull request to the merge queue Nov 24, 2025
Merged via the queue into main with commit 0f26815 Nov 25, 2025
18 checks passed
@minestarks minestarks deleted the minestarks/circuit-disable-tracing-vscode-run branch November 25, 2025 00:15
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.

Improve WASM layer error handling

6 participants