Skip to content

Turbo sourcemaps not hitting TS breakpoints in imported modules #1554

Closed
@MattReimer

Description

I believe this issue is in relation to the new debugger optimizations in patch 1.75 last week

When the patch hit last week we were unable to put breakpoints into '*.ts' files in imported modules and have them hit. We're running a lerna monorepo if that's useful.

  • Breakpoints on the '*.ts' files in the package we execute the code did work.
  • Breakpoints on the '*.js' files in our /dist/ folders for both the original package and the imported ones did hit correctly.
  • Breakpoints on any '*.ts' files from imported modules did not fire.
  • Adding "enableTurboSourcemaps": false to our launch.json file fixes the issue

I'm not sure what would be helpful to debug this but here is my profile from launch.json

    {
      "name": "🚀 GQL Lambda API: (RUN)",
      "type": "node",
      "request": "launch",
      "runtimeArgs": [
        "-r",
        "ts-node/register"
      ],
      "cwd": "${workspaceRoot}",
      "console": "integratedTerminal",
      "program": "${workspaceFolder}/src/servers.ts",
      "sourceMaps": true,
      "enableTurboSourcemaps": false, // this fixed the issue
      "envFile": "${workspaceFolder}/../../.env.local.${input:environment}",
      "outFiles": [
        "${workspaceFolder}/../dist/**/*.js",
        "!**/node_modules/**"
      ],
    },

This worked flawlessly until VSCode updated last week. The note in the changelog said enableTurboSourcemaps will eventually be depprecated so obviously we'd like to see some kind of resolution to the issue before that happens.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions