Skip to content

debugger: list and clear breakpoints set on functions - #66744

Open
dualfroz wants to merge 1 commit into
nodejs:mainfrom
dualfroz:fix/41790-function-breakpoints
Open

dualfroz wants to merge 1 commit into
nodejs:mainfrom
dualfroz:fix/41790-function-breakpoints

Conversation

@dualfroz

Copy link
Copy Markdown

Fixes: #41790

picks up #53798 by @rotu (kept as co-author). sb('fn()') went
through debug() from the command line API, so there was no
breakpoint id to keep. it now uses Debugger.setBreakpointOnFunctionCall,
the breakpoint shows up in breakpoints as fn() and cb('fn()')
removes it. like before, these aren't restored after restart.
test-debugger-break needed a small update since the function
breakpoint is now listed and the pause reads break in.

`sb('fn()')` used the `debug()` command line API, which gives no
breakpoint id, so these breakpoints never showed up in `breakpoints`
and could not be removed with `cb`. Use
`Debugger.setBreakpointOnFunctionCall` instead and keep the breakpoint
in the list, so it is listed as `fn()` and can be cleared with
`cb('fn()')`.

Fixes: nodejs#41790
Co-authored-by: Dan Rose <danoftheroses@gmail.com>
Signed-off-by: dualfroz <me@dualfroz.com>
@nodejs-github-bot nodejs-github-bot added debugger Issues and PRs related to the Node.js command-line debugger. needs-ci PRs that need a full CI run. labels Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

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

Labels

debugger Issues and PRs related to the Node.js command-line debugger. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"breakpoints" command not listing breakpoints: "No breakpoints yet"

2 participants