chore(dx): stop the debugger breaking on every mekik pause - #9
Merged
Conversation
A mekik pause is not an error: `Shuttle.Approve` calls ilmek's
`ctx.InterruptAsync`, which throws `InterruptSignalException` to unwind the node,
and the ilmek engine catches it and ends the run `interrupted`. Normal control
flow, on every single pause.
With Just My Code on, the debugger sees that exception leave user code and get
caught by library code, calls it "user-unhandled", and breaks — so debugging any
app that pauses means pressing Continue over and over:
Ilmek.InterruptSignalException: 'ilmek: paused for a human at interrupt#0'
Turn Just My Code off and the debugger only breaks on exceptions nothing catches,
which an interrupt never is. Set here per launch configuration and in
settings.json (for sessions started without one), both with the parameter marked
so it can be flipped back when the pause path itself is what you're debugging.
The trade-off is that stepping can now walk into library code.
Visual Studio keeps this setting in the user profile rather than the repo — see
the docs added alongside the feature work for the Exception Settings route.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
A mekik pause is a thrown exception by design —
Shuttle.Approve→ ilmek'sctx.InterruptAsync→InterruptSignalException, caught by the ilmek engine, run endsinterrupted. With Just My Code on, the debugger sees it leave user code and get caught by library code, calls that "user-unhandled", and breaks. Every pause:Nothing is wrong; debugging an app that pauses is just an exercise in pressing Continue.
What this does
.vscode/launch.json"justMyCode": false.vscode/settings.json"csharp.debug.justMyCode": falsefor sessions started without a launch config.vscode/tasks.jsonbuildtask those configs use.gitignoretasks.json(.vscode/*is ignored; the other three were already exempt)Both are off by default — flip either to
truewhen the pause path itself is what you want to stop in. The parameter is commented in place.Trade-off: with Just My Code off, stepping can walk into framework/library code.
Visual Studio can't be configured from the repo — the setting lives in the user profile: Debug → Windows → Exception Settings, right-click
Ilmek.InterruptSignalException→ Continue When Unhandled in User Code. Documented indocs/HITL.md(in #(the feature PR), which touches those doc files).Verified
dotnet build dotnet/Mekik.slnx→ 0 warnings, 0 errors; the fiveprogrampaths in launch.json all resolve;.vscode/is no longer git-ignored.🤖 Generated with Claude Code