My English is not very good, so I’m using ChatGPT for translation. I apologize for any formatting errors or other issues.
Describe the bug
Debugging a JavaScript file which leverages module.register does end up in a infinite hang.
This issue is the same asissue2009, which was closed due to lack of a reproduction method. I have found a stable way to reproduce the issue.
To Reproduce
//入口.js
import { register } from 'module'
console.log('print something');
register('anything') // hang up if has break point in this file
console.log('set break point here');
In VS Code, set a breakpoint on line 6 of入口.js
In the VS Code terminal (I'm using cmd), run node --inspect ./入口.js
Log File
N/A
VS Code Version: 1.94.2
Additional context
The key to reproducing this issue is having Chinese characters in the file path of the file containing the breakpoint,However, it seems that the length of the Chinese characters matters. For example,if 入口.js is replaced with入.jsor口.js, it outputs nothing and simply exits.
If the filename is in another language, such as テスト.js (Japanese), it also outputs nothing.
I tested this on two versions of Node (v22.11.0 and v18.20.4), and the issue exists on both.
My English is not very good, so I’m using ChatGPT for translation. I apologize for any formatting errors or other issues.
Describe the bug Debugging a JavaScript file which leverages module.register does end up in a infinite hang. This issue is the same asissue2009, which was closed due to lack of a reproduction method. I have found a stable way to reproduce the issue.
To Reproduce
入口.js
node --inspect ./入口.js
Log File N/A
VS Code Version: 1.94.2
Additional context
The key to reproducing this issue is having Chinese characters in the file path of the file containing the breakpoint,However, it seems that the length of the Chinese characters matters. For example,if
入口.js
is replaced with入.js
or口.js
, it outputs nothing and simply exits.If the filename is in another language, such as
テスト.js
(Japanese), it also outputs nothing.I tested this on two versions of Node (
v22.11.0
andv18.20.4
), and the issue exists on both.