Skip to content

How to fix port undefined #23

@anasrar

Description

@anasrar

Do not use latest commit https://github.com/microsoft/vscode-js-debug . use v1.74.1.

Error

[dap-js] JS Debugger stderr:
[dap-js] JS Debugger stderr: /path-to/vscode-js-debug/src/vsDebugServer.ts:93                                                                                                                 
    console.log((result.server.address() as net.AddressInfo).port.toString());                                                                                                                                                                
                                                                 ^                                                                                                                                                                            
TypeError: Cannot read properties of undefined (reading 'toString')                                                                                                                                                                           
    at VsDebugServer.launchRoot (/path-to/vscode-js-debug/src/vsDebugServer.ts:93:66)                                                                                                         
    at processTicksAndRejections (node:internal/process/task_queues:95:5)     
[dap-js] JS Debugger exited with code 1! 

Manually

git clone https://github.com/microsoft/vscode-js-debug
cd vscode-js-debug
git pull
git fetch --all --tags
git checkout tags/v1.74.1
npm install --legacy-peer-deps
npm run compile

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions