microsoft / microsoft/vscode-react-native
[Feature] Source map read errors are silently swallowed during source map conversion
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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