microsoft / microsoft/lage

Lage's own build does not produce SourceMaps

Open
#810 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
816
Forks
88
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
Debugging Lage itself is not as easy as it could be.
The transpiler does not seem to emit SourceMap (.js.map) files to make the debug/edit loop super effecient...

To Reproduce
Steps to reproduce the behavior:

  1. enlist and build lage repo
  2. add launch.json with a section like:
  3. put a breakpoint in the .ts file that should be hit...
  4. Start the program

Expected behavior
Breakpoint to be hit. But it is not because there is no sourcemap (not for the .js file running with yarn watch nor for the bundle...

Troubleshooting
I tried adding sourcemaps: true to the .swrcc file but that flag only works for the entire compile unit and we are manually doing stuff file by file...
I tried reading the rust code, but it seems that the 'transform' function does not handle sourcemaps....

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the missing mappings by building the Lage repository and running yarn watch, then inspect the .swrcc configuration and the Rust transform function mentioned in the report. Done means source maps are emitted for both the running JavaScript file and the bundle, allowing a breakpoint in the TypeScript source to be hit.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, typescript
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.