Skip to content

Source maps in inlined deps are off by a few lines in VS Code #5605

@bgoscinski

Description

@bgoscinski

Describe the bug

Source maps in inlined deps are off by a few lines in VS Code debugger

Reproduction

https://github.com/bgoscinski/repro-vitest-sourcemap

  1. pnpm install
  2. code test/the.test.ts
  3. Set breakpoint at line 3 of the test file
  4. Start debugging session using 'Debug' configuration
  5. Wait for debugger to attach
  6. Press 'Step into' until you're in add function implementation
  7. Press 'Step over' and see that debugger highlights invalid line
2024-04-23_21-19-51.mp4

System Info

System:
    OS: Windows 11 10.0.22000
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
    Memory: 19.73 GB / 47.70 GB
  Binaries:
    Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.15.6 - ~\AppData\Roaming\npm\pnpm.CMD
    bun: 1.1.1 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (123.0.2420.97)
  npmPackages:
    @vitest/ui: latest => 1.5.0
    vite: latest => 5.2.10
    vitest: latest => 1.5.0

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededp3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions