Breakpoints fail to bind in Node 16 or Chrome 90 in functions with destructured arguments
See original GitHub issueDescribe the bug If a file contains two nested anonymous functions with parameters in Node 16 it’s impossible to set a breakpoint on the inner function. Minimal example here: https://github.com/richardsimko/vscode-debugger-issues
if you run the code with npm run start
and try to use any of the debug targets to attach to the process it becomes impossible to set a breakpoint on line 5 of index.js
.
To Reproduce Steps to reproduce the behavior:
git clone git@github.com:richardsimko/vscode-debugger-issues.git
npm run start
- Launch debug target
- Try to set breakpoint in the inner function
Log File
I’ve attached a log file of me launching the debug config, trying to add the breakpoint and quitting the debug config.
VS Code Version: 1.56.2
Additional context
Possibly related to using type: module
, but I’m not sure. It works on any node versions <16 and I couldn’t find anything specific to neither the debugger nor ESM in the patch notes.
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (6 by maintainers)
Top GitHub Comments
I think this is the MR we’re waiting for. https://github.com/nodejs/node/pull/38273
Please verify the warning is present; 16.3 was just released on Thursday and I don’t plan to push candidate fixes for this (or future) releases. It’s a helpful hint to exist, but Node will continue releasing updates and I will patch for them on our normal release cadence.