Skip to content

Debugging with ts-node in WSL: Breakpoints set but not yet bound #40813

@rhyek

Description

@rhyek
  • VSCode Version: Code 1.19.1 (0759f77, 2017-12-19T09:46:23.884Z)
  • OS Version: Windows_NT x64 10.0.16299
  • Extensions:
Extension Author (truncated) Version
vscode-eslint dba 1.4.3
githistory don 0.2.3
gitlens eam 7.1.0
tslint eg2 1.0.24
php-debug fel 1.12.1
php-intellisense fel 2.2.2
flow-for-vscode flo 0.7.3
auto-close-tag for 0.5.5
auto-rename-tag for 0.0.15
vscode-styled-components jpo 0.0.10
csharp ms- 1.13.1
debugger-for-chrome msj 4.0.0
vetur oct 0.11.5
twospacefourspace Ohm 0.2.1
vscode-docker Pet 0.0.22
material-icon-theme PKi 3.2.0
ejs-language-support Qas 0.0.1
code-settings-sync Sha 2.8.7
html5-boilerplate sid 1.0.1
indenticator Sir 0.4.2
Align ste 0.2.0
html-preview-vscode tht 0.1.1

(3 theme extensions excluded)


Steps to Reproduce:

  1. Run a TypeScript program inside WSL with ./node_modules/.bin/ts-node --inspect=3001 --project ./src/server ./src/server/index.ts
  2. Run the following launch configuration:
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "attach",
      "name": "Attach",
      "port": 3001,
      "restart": true,
      "protocol": "inspector",
      "localRoot": "${workspaceFolder}",
      "remoteRoot": "/mnt/c/Users/Carlos/Dev/personal/boilerplates/express-react"
    }
  ]
}
  1. Any breakpoints in my .ts files are greyed out and have the tooltip "Breakpoints set but not yet bound".

If I run the same command from Windows command prompt and run the same debug configuration without localRoot and remoteRoot I can hit breakpoints perfectly.

I also notice that when run from Windows, I have some output of my program in the Debug Console stating the file's origin as file:///c%3A/Users/Carlos/Dev/personal/boilerplates/express-react/src/server/index.ts while when run from WSL it's debug:/mnt/c/Users/Carlos/Dev/personal/boilerplates/express-react/src/server/index.ts?session%3D6747a367-f75f-4749-8249-57bc7bf64603%26ref%3D1001. Not sure if that's relevant.

Metadata

Metadata

Assignees

Labels

WSLIssue when using WSLbugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions