Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbound breakpoint for TypeScript files #148864

Closed
sebastianrath opened this issue May 6, 2022 · 7 comments · Fixed by microsoft/vscode-js-debug#1258
Closed

Unbound breakpoint for TypeScript files #148864

sebastianrath opened this issue May 6, 2022 · 7 comments · Fixed by microsoft/vscode-js-debug#1258
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@sebastianrath
Copy link

sebastianrath commented May 6, 2022

Does this issue occur when all extensions are disabled?: Yes

I am building an Electron app, and the latest version of VScode stops binding breakpoints in TypeScript files. It is reproducible by switching between versions of VScode.

I also checked the latest Insider Build, with no success. Once I switch back to v1.66.2 it works.

Broken Version

Version: 1.67.0 (user setup)
Commit: 57fd6d0
Date: 2022-05-04T12:06:02.889Z
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Windows_NT x64 10.0.22610

image

Last Working Version

Version: 1.66.2 (user setup)
Commit: dfd34e8
Date: 2022-04-11T07:46:01.075Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows_NT x64 10.0.22610

image

The content of the launch.json is as follows:

    {
      "name": "Electron: Renderer",
      "type": "chrome",
      "request": "attach",
      "port": 9223,
      "sourceMaps": true,
      "webRoot": "${workspaceRoot}",
      "sourceMapPathOverrides": {
        "webpack:///./~/*": "${workspaceFolder}/node_modules/*",
        "webpack://?:*/*": "${workspaceFolder}/*"
      },
      "timeout": 300000
    },
@connor4312
Copy link
Member

Please grab some log files!

/jsDebugLogs

@connor4312 connor4312 assigned connor4312 and unassigned roblourens May 6, 2022
@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster debug Debug viewlet, configurations, breakpoints, adapter issues labels May 6, 2022
@sebastianrath
Copy link
Author

sebastianrath commented May 6, 2022

I'll send in the logs by email, but this log entry here stood out:

dap.receive

{
  "tag": "dap.receive",
  "timestamp": 1651845179436,
  "metadata": {
    "connectionId": 0,
    "message": {
      "command": "setBreakpoints",
      "arguments": {
        "source": {
          "name": "three.ts",
          "path": "c:\\Users\\sebastian\\Documents\\git\\foo\\src\\app\\viewer\\three\\three.ts"
        },
        "lines": [
          566
        ],
        "breakpoints": [
          {
            "line": 566
          }
        ],
        "sourceModified": false
      },
      "type": "request",
      "seq": 7
    }
  },
  "level": 0
}

dap.send

{
  "tag": "dap.send",
  "timestamp": 1651845179437,
  "metadata": {
    "connectionId": 0,
    "message": {
      "seq": 19,
      "type": "response",
      "request_seq": 7,
      "command": "setBreakpoints",
      "success": true,
      "body": {
        "breakpoints": [
          {
            "id": 1,
            "verified": false,
            "message": "Unbound breakpoint"
          }
        ]
      }
    }
  },
  "level": 0
}

@connor4312
Copy link
Member

It doesn't look like I received anything, can you make sure it didn't bounce?

@sebastianrath
Copy link
Author

sebastianrath commented May 6, 2022

Email sent. ✉️ 🚀

@connor4312
Copy link
Member

connor4312 commented May 6, 2022

Thanks for your help!

Over email we figured out it was because we made a change that added support for pathMapping sourcemaps. In this change, we preferentially loaded sourcemaps from the mapped URI, which is a file URI on disk. In this case, there actually was a sourcemap of the expected name on disk, which was not the version we would have preferred to load from the webpack-dev-server.

I will put in a PR to change the ordering back, which I think is fine, pathMapping of sourcemaps is only really useful if they don't exist at the original/intended location.

This issue may be candidate-worthy depending on whether we get more reports of it.

@sebastianrath
Copy link
Author

Spot on help, thanks so much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
4 participants
@roblourens @connor4312 @sebastianrath and others