[Stepping] step through generated files
It would be nice to be able to step through code in the generated file. This basically means that we want to know when we're stepping that the currently selected source is generated. If the source is generated, then we don't want to map the selected location.
We can also take this idea one step further and when you select a source, we can make all locations are mapped:
- call stack
- selected line
@@ -57,8 +73,11 @@ export function paused(pauseInfo: Pause) {
return async function({ dispatch, getState, client, sourceMaps }: ThunkArgs) {
let { frames, why, loadedObjects } = pauseInfo;
- frames = await updateFrameLocations(frames, sourceMaps);
- const frame = frames[0];
+ const selectedLocation = getSelectedLocation(getState())
+ if (sourceMaps.isOriginalLocation(selectedLocation.get("id")) {
+ frames = await updateFrameLocations(frames, sourceMaps);
+ const frame = frames[0];
+ }
Steps to get started:
- go to increment
- add a breakpoint at
bundle.js#121 - click the increment button
You should pause on line 121, but instead you pause on math.js#3
Then, when you step, you should stay in bundle.js, but instead you go to math.js !!!
/claim
Thanks for claiming the issue! :wave:
!!! Please check your email and confirm the invitation
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!
Hey Jason I created a pull request with this feature https://github.com/devtools-html/debugger.html/pull/5025