microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.99k stars 29.54k forks source link

Error executing the launcher #180383

Closed djraul closed 1 year ago

djraul commented 1 year ago

Type: Bug

without changing this launch

 "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Gulp dev lang",
            "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
            "args": [
                "development", "--lang", "en", "--norev"
            ],
            "console": "integratedTerminal"
        }
]

After upgrading to the latest version of vscode March 2023 (version 1.77) A launcher configuration is launched with F5 and fails:

${env:NODE_OPTIONS}='--require C:\Users\ijimenez\AppData\Local\Temp\vscode-js-debug-bootloader.js'; ${env:VSCODE_INSPECTOR_OPTIONS}='{"inspectorIpc":"\\\\.\\pipe\\node-cdp.17680-a3bff94c-1.sock","deferredMode":false,"waitForDebugger":"","execPath":"C:\\Program Files\\nodejs\\node.exe","onlyEntrypoint":false,"autoAttachMode":"always","fileCallback":"C:\\Users\\ijimenez\\AppData\\Local\\Temp\\node-debug-callback-e2159ae007c31f74"}'; & 'C:\Program Files\nodejs\node.exe' '.\node_modules\gulp\bin\gulp.js' 'development' '--lang' 'en' '--norev'
c:\Users\ijimenez\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_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Hr=V((hu,Fr)=>{"use strict";var fo=et(),{MAX_LENGTH:Dr,CHAR_BACKSLASH:Et,CHAR_BACKTICK:po,CHAR_COMMA:ho,CHAR_DOT:go,CHAR_LEFT_PARENTHESES:mo,CHAR_RIGHT_PARENTHESES:_o,CHAR_LEFT_CURLY_BRACE:yo,CHAR_RIGHT_CURLY_BRACE:xo,CHAR_LEFT_SQUARE_BRACKET:Br,CHAR_RIGHT_SQUARE_BRACKET:Mr,CHAR_DOUBLE_QUOTE:bo,CHAR_SINGLE_QUOTE:vo,CHAR_NO_BREAK_SPACE:So,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Eo}=Lr(),To=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Dr,r.maxLength):Dr;if(e.length>n)throw new SyntaxError(`Input len

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:152:10)
    at Module._compile (module.js:605:28)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\ijimenez\AppData\Local\Temp\vscode-js-debug-bootloader.js:1:63)

A popup appears with the following message: The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" finalizó ended with exit code 1.

VS Code version: Code 1.77.3 (704ed70d4fd1c6bd6342c436f1ede30d1cff4710, 2023-04-12T09:16:02.548Z) OS version: Windows_NT x64 10.0.19044 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz (16 x 2904)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|15.72GB (3.07GB free)| |Process Argv|--crash-reporter-id 5765263a-ba34-4ffb-9f9b-6f60d598192d| |Screen Reader|no| |VM|0%|
Extensions (19) Extension|Author (truncated)|Version ---|---|--- extendscript-debug|Ado|2.0.3 Bookmarks|ale|13.3.1 better-toml|bun|0.3.2 turbo-console-log|Cha|2.9.3 npm-intellisense|chr|1.4.4 vscode-devtools-for-chrome|cod|0.0.7 dscodegpt|Dan|2.1.5 vscode-eslint|dba|2.4.0 tortoise-svn|fan|0.1.1 vscode-test-explorer|hbe|2.21.1 haskell-linter|hoo|0.0.6 theme-karyfoundation-themes|kar|32.3.0 dotenv|mik|1.0.1 vscode-language-pack-es|MS-|1.77.2023041209 test-adapter-converter|ms-|0.1.7 sonarlint-vscode|Son|3.17.0 vscode-icons|vsc|12.3.0 vscode-todo-highlight|way|1.0.5 debug|web|0.26.1 (17 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30610678 nodejswelcome1cf:30587006 3biah626:30602489 pyind779:30671433 89544117:30613380 pythonsymbol12:30671437 2i9eh265:30646982 showlangstatbar:30672706 defaultazurewalk:30687958 pythonms35:30701012 pythonfmttext:30716742 pythonclientmv:30713943 ```
connor4312 commented 1 year ago

What version of Node.js are you using?

djraul commented 1 year ago

v9.0.0

connor4312 commented 1 year ago

Please update; that version of Node.js has been end of life for almost 5 years and we do not support it.

djraul commented 1 year ago

ok thank you

dinofx commented 1 year ago

I was able to get things working again in node 8 by just adding the missing catch binding, so replace catch { with catch (_unused) {, and there was also one string literal somewhere with an actual newline that needed to be replaced with an escaped newline (\n)

djraul commented 1 year ago

that's wonderful, thank you very much @dinofx

iii-james commented 1 year ago

adding the missing catch binding

@dinofx Do you remember what file you updated the catch { and \n to make it work with node 8?

dinofx commented 1 year ago

@iii-james the file is in the stacktrace for this issue: vscode-js-debug-bootloader.js

natharaujos commented 1 year ago

I cant found that file @dinofx

JACrazy commented 1 month ago

I was able to get things working again in node 8 by just adding the missing catch binding, so replace catch { with catch (_unused) {, and there was also one string literal somewhere with an actual newline that needed to be replaced with an escaped newline (\n)

Awesome, the changes worked. Only needed to replace all the catch{ never saw any newlines causing issues. Node 8.9.1 here.