nodejs / nodejs/node

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

Open
#41,790 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

Hi, is this the upstream for what I describe below? :-)

main.js

#!/usr/bin/env node

function myfunc(i) {
  return i + 1;
}

let i = 1;
i += 1;
console.log(myfunc(i));

Start debugging:

node inspect main.js

Leaves me at:

Break on start in main.js:7
  5 }
  6 
> 7 let i = 1;
  8 i += 1;
  9 console.log(myfunc(i));

Now I set a breakpoint successfully:

sb('myfunc()')

but when I then run:

breakpoints

it just shows:


debug> breakpoints
No breakpoints yet

But help says: https://github.com/nodejs/node-inspect/blob/643179ef5e0452a52ceef2c5e7c8ca42ab00280f/lib/internal/inspect_repl.js#L57

Tested on node v14.15.3.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with the provided main.js example using node inspect main.js, then inspect lib/internal/inspect_repl.js at the linked help entry and trace the breakpoints command. Done means a breakpoint set with sb('myfunc()') is listed instead of reporting “No breakpoints yet”.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.