Skip to content

A breakpoint whose condition cannot be evaluated is passed silently #54

Description

@hexbinoct

Built from source at 293d77f (0.1.17), net10.0, Windows x64.

A conditional breakpoint whose condition cannot be evaluated is passed silently. No stop, no breakpoint event, no message.

Three conditions, all of which fail to evaluate for different reasons:

var i = 5;                       // bp_cond_fail_1, condition: "i"            (not a boolean)
Console.WriteLine(i);            // bp_cond_fail_2, condition: "nosuchname"   (unresolved name)
Console.WriteLine(i);            // bp_cond_fail_3, condition: "Throwing()"   (throws during evaluation)
breakpoint SharpDbg netcoredbg
bp_cond_fail_1 stops stops, message says the condition is not a boolean
bp_cond_fail_2 runs past, silently stops, message names the unresolved name
bp_cond_fail_3 runs past, silently stops, message says evaluation threw

Stopping is the safer default: a breakpoint the user asked for goes missing otherwise, and there is nothing anywhere to say why. If you would rather not stop, a breakpoint event carrying a message would at least surface it.

VSCodeTestBreakpoint upstream in netcoredbg covers this and would fail at its second WasBreakpointHit.

Separately, in the same run: SharpDbg stops at breakpoints inside [DebuggerStepThrough], [DebuggerNonUserCode] and [DebuggerHidden] methods, including with just-my-code on. That is the same attribute handling as #52, now with breakpoints as well as steps.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions