Page MenuHomePhabricator

[keyserver] Add `--source-maps` flag to `babel-build` for more sane debugging experience
ClosedPublic

Authored by atul on Aug 30 2022, 11:56 AM.
Tags
None
Referenced Files
F3532982: D4984.id16133.diff
Wed, Dec 25, 10:47 AM
Unknown Object (File)
Mon, Dec 16, 12:30 AM
Unknown Object (File)
Thu, Dec 12, 2:31 AM
Unknown Object (File)
Nov 20 2024, 3:38 AM
Unknown Object (File)
Nov 11 2024, 2:51 AM
Unknown Object (File)
Nov 9 2024, 6:57 AM
Unknown Object (File)
Nov 9 2024, 6:56 AM
Unknown Object (File)
Nov 9 2024, 6:56 AM
Subscribers

Details

Summary

We previously weren't generating source maps when running babel-build in dev.

This led to a pretty painful debugging experience for keyserver in VSCode/WebStorm/etc. If the developer wanted to set breakpoints they'd need to

  1. Navigate out of the src file to the corresponding file in dist (tedious/context switch/etc)
  2. Set breakpoints in transpiled output which often looked pretty different from source

In addition, the developer would need to keep hopping between the files because dist got rewritten on changes to src which meant the developer couldn't just iterate within dist either.

This diff adds the --source-maps flag to babel-build for dev which enables a much smoother debugging experience. Breakpoints can be set directly in source and iteration can happen in realtime.

I should have investigated this much much earlier...

Test Plan

Worked in VSCode and WebStorm out of the box:

Screen Shot 2022-08-30 at 2.40.47 PM.png (1×3 px, 883 KB)

Screen Shot 2022-08-30 at 2.43.52 PM.png (1×3 px, 935 KB)

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul published this revision for review.Aug 30 2022, 11:57 AM
atul edited the test plan for this revision. (Show Details)
atul edited the summary of this revision. (Show Details)
atul edited the summary of this revision. (Show Details)

Patched this and tried it. Wow this should have been done long ago. Makes debugging keyserver so much easier

This revision is now accepted and ready to land.Aug 31 2022, 4:25 AM

rebase around other diffs before landing