Skip to content

Variables in bundled code with source maps aren't renamed properly #2201

@sadan4

Description

@sadan4

Describe the bug
A clear and concise description of what the bug is.

On and after 7a11f7c, names from larger source maps are not parsed most of the time1

To Reproduce
Steps to reproduce the behavior:

Using the reproduction at https://github.com/sadan4/map-names-repro

  1. Use version b389427
  2. Set a breakpoint in index.ts
  3. Run the code
  4. Notice that names are mapped
Image

Image

  1. Use any version after that (I tested on 7a11f7c, and latest main 1942fd6)
  2. Set a breakpoint in index.ts
  3. Run the code
  4. Notice that names aren't mapped
Image

Image

Log File

broken log

working log

VS Code Version: Version: 1.99.0

Additional context
Add any other context about the problem here.

This only seems to be an issue with larger bundles. If I remove the require("typescript") from the reproduction (only added to increase the bundle size) the variables are renamed properly

Footnotes

  1. On the code I encountered this issue in, a few variables would have their names mapped randomly, but I rarely encountered this and could not notice any patterns.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions