microsoft / microsoft/vscode-react-native

[Feature] Source map read errors are silently swallowed during source map conversion

Open Beginner friendly
#2,914 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
2.7k
Forks
295
Avg merge
11h 17m
Merged PRs (30d)
24

Description

Description

SourceMapsCombinator.convert wraps source map loading in a try/finally block and returns the accumulated result from finally.

A return statement inside finally overrides exceptions thrown while reading or parsing a source map. As a result, missing files, permission failures, and malformed source maps are silently treated as if no source map were available.

Expected behavior

Errors raised while reading or parsing a source map should propagate to the caller so that the conversion failure can be diagnosed and handled appropriately.

Actual behavior

The exception is suppressed and conversion either continues or returns the original bundle source map. This can result in incorrect breakpoint or stack-frame mapping without exposing the underlying cause.

Proposed fix

Remove the try/finally wrapper and return normally after loading the source map consumer:

const consumer = this.getSourceMapConsumerFrom(file);
if (consumer) {
    result[file] = consumer;
}
return result;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at SourceMapsCombinator.convert and inspect its call to getSourceMapConsumerFrom(file), focusing on how loading and parsing failures are handled. Confirm the change preserves successful source map accumulation while allowing read or parse errors to reach the caller; validate with the repository's relevant source map conversion checks if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, devtools
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.