Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow easy toggling between sourcemaps and compiled code in js-debug #151412

Closed
connor4312 opened this issue Jun 7, 2022 · 6 comments · Fixed by microsoft/vscode-js-debug#1306
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality on-testplan
Milestone

Comments

@connor4312
Copy link
Member

connor4312 commented Jun 7, 2022

@jrieken wanted the ability to easily disable sourcemaps in js-debug, and mentioned @alexdima and @bpasero also like debugging without sourcemaps. However, changing this in the launch config via sourceMap: true/false is burdensome and makes the decision for the whole team, where it should be a user choice.

He suggested a some button (an editor action? is that too prominent?) to toggle sourcemaps on off.

  • The button should remember its state in the workspace between reloads
  • Breakpoints should always be allowed to be set in the source code, but appear in (be moved to, since BPs can only appear in one location) the compiled code when sourcemaps are disabled, and should show in the source code otherwise.
    • Therefore in this mode, we don't fully "disable sourcemaps", more just control where the debugger steps in
    • However we can optimize some things and be extra-lazy about parsing sourcemaps when "disabled"
@connor4312 connor4312 added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues labels Jun 7, 2022
@connor4312 connor4312 added this to the June 2022 milestone Jun 7, 2022
@connor4312 connor4312 self-assigned this Jun 7, 2022
@isidorn
Copy link
Contributor

isidorn commented Jun 8, 2022

Editor title action might be too prominent. Why not Call Stack title area action? I think extensions can not contribute to this place right now, but we could change this.

fyi @roblourens for ideas.

@jrieken
Copy link
Member

jrieken commented Jun 8, 2022

Why not Call Stack title area action?

Because it isn't an action that operates on call stacks but on the whole file/editor?

@roblourens
Copy link
Member

I think this would operate on the whole debug session, not one editor. That makes me think it would make more sense as a context menu item on the debug session. I also don't think this will be commonly used enough to have a button for it. But, it should be really obvious somehow that this mode is activated.

@roblourens
Copy link
Member

Also, you can maintain your own launch configs in a workspace config, I do this sometimes. But I get that it's a pain to clone our huge vscode launch.json

@connor4312
Copy link
Member Author

connor4312 commented Jun 8, 2022

We could have a context menu action on the debug session, and then when the sourcemapless mode is active put a button in the debug toolbar to turn it back off.

@isidorn
Copy link
Contributor

isidorn commented Jun 9, 2022

@connor4312 sounds good to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants