go-delve / delve

Delve is a debugger for the Go programming language.
MIT License
22.38k stars 2.13k forks source link

pkg/terminal: allow postfix if for breakpoint conds #3693

Closed derekparker closed 2 months ago

derekparker commented 3 months ago

Allows for a user to specify the breakpoint condition directly when creating the breakpoint. The new syntax looks like the following:

break <name> <locspec> [if <expression>]

Also updates docs to include more examples and locspec description instead of directing users to the online / source documentation.

derekparker commented 3 months ago

Apologies for the formatting noise, editor did that automatically and I noticed after. Tried to keep all that in a separate commit to make it easier to review the core change.

derekparker commented 3 months ago

Rebased and removed formatting changes not related to this patch.