nodejs / nodejs/node

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

未关闭
#41,790 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
122k
派生
37.3k
平均合并
4 天 2 小时
30 天内合并 PR
283

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用提供的 main.js 示例,通过 node inspect main.js 重现该报告,然后在链接的帮助条目处检查 lib/internal/inspect_repl.js,并追踪 breakpoints 命令。完成的标准是:使用 sb('myfunc()') 设置的断点会被列出,而不是报告“No breakpoints yet”。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, node.js
领域
cli, devtools
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
65/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。