microsoft / vscode-js-debug

A DAP-compatible JavaScript debugger. Used in VS Code, VS, + more
MIT License
1.67k stars 282 forks source link

Error on vscode js debug terminal #1990

Closed gchiarapa closed 7 months ago

gchiarapa commented 7 months ago

When I open Javascript debug terminal I got the error:

c:\Users\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ms-vscode.js-debug\src\bootloader.js:2
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}"
,CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"       ",CHAR_UNDERSCORE:"_",CHAR_VERTICA
L_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Ur=k((Ja,Fr)=>{"use strict";var oo=Qe(),{MAX_LENGTH:Hr,CHAR_BACKSLASH:Tt,CHAR_BAC
KTICK:io,CHAR_COMMA:ao,CHAR_DOT:lo,CHAR_LEFT_PARENTHESES:uo,CHAR_RIGHT_PARENTHESES:co,CHAR_LEFT_CURLY_BRACE:fo,CHAR_RIGHT_CURLY_BRACE:po,C
HAR_LEFT_SQUARE_BRACKET:Mr,CHAR_RIGHT_SQUARE_BRACKET:$r,CHAR_DOUBLE_QUOTE:ho,CHAR_SINGLE_QUOTE:go,CHAR_NO_BREAK_SPACE:mo,CHAR_ZERO_WIDTH_N
OBREAK_SPACE:_o}=Br(),yo=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="numb
er"?Math.min(Hr,r.maxLength):Hr;if(e.length>n)throw new SyntaxError(`Input le

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:607:28)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\AppData\Local\Temp\vscode-js-debug-bootloader.js:1:63)

Launch.json content:

{
    "version": "0.2.0",
    "configurations": [
        {
            "command": "npm run debug --inspect",
            "name": "Run npm debug",
            "request": "launch",
            "port": 9222,
            "type": "node-terminal"
        },
        {
            "type": "node-terminal",
            "name": "Run Script: debug",
            "request": "launch",
            "command": "npm run debug",
            "cwd": "${workspaceFolder}"
        }
    ]
}

**VS Code Version: 1.88.0

connor4312 commented 7 months ago

Please update your Node.js version, it seems to be very old.

ipg0 commented 6 days ago

@connor4312 why is this closed as completed? Just saying "update your node version" is by no means completing an issue. Isn't this more of a "won't fix" situation?

connor4312 commented 6 days ago

This syntax error is due to a Node.js version <4, which has been end of life for over 8 years and we do not support it.

ipg0 commented 4 days ago

@connor4312 I've reproduced the same bug with Node v8.17.0.

connor4312 commented 4 days ago

We do not support that either. Node 8 has been end of life for 5 years now. The latest LTS version of Node is 22.