Skip to content

Fix debugger error formatting in circuit panel#3191

Open
joao-boechat wants to merge 3 commits intomainfrom
joaoboechat/fix-debugger-error-parsing
Open

Fix debugger error formatting in circuit panel#3191
joao-boechat wants to merge 3 commits intomainfrom
joaoboechat/fix-debugger-error-parsing

Conversation

@joao-boechat
Copy link
Copy Markdown
Contributor

This PR fixes #1536

Previously, runtime errors from the debugger were displayed as unreadable text in the circuit panel. The errors were being serialized as plain JS Error objects in the WASM layer and the extension was displaying the raw stack trace instead of the actual error message. This PR aligns the debugger's error handling with the circuit panel command by serializing errors as structured IQSharpError diagnostics all the way from WASM through the worker boundary to the VS Code extension, where they are now formatted with the same errorsToHtml function used by the "Show Circuit" command — including error codes, source locations, and clickable links to the relevant Q# source files.

Before:

image

Now:

image

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.

When Q# program fails in "Run" or "Debug" mode, circuit panel shows gibberish error

2 participants