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

Clicking F11 while not in debug mode turns on debug instead of going full screen #141157

Closed
RadhiRasho opened this issue Jan 21, 2022 · 6 comments · Fixed by microsoft/vscode-js-debug#1255
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@RadhiRasho
Copy link

RadhiRasho commented Jan 21, 2022

Have a few configurations (mine were javascript client/server attach) for the debugging and click F11, while not in debug mode, and have Auto Attach turned on with With Flag as the option.

Once clicking F11, it tries to turn on debugging for a few seconds, and then stops:

This is the Output from the Log (Window) error that appears:
image

@mjs510
Copy link

mjs510 commented Apr 13, 2022

It seems these are both the defaults in 1.66.2.

{
  "key": "f11",
  "command": "extension.node-debug.startWithStopOnEntry",
  "when": "!inDebugMode && debugConfigurationType == 'node' || !inDebugMode && debugConfigurationType == 'pwa-extensionHost' || !inDebugMode && debugConfigurationType == 'pwa-node'"
}
{
  "key": "f11",
  "command": "workbench.action.toggleFullScreen",
  "when": "!isIOS"
}

So, for example, F11 starts debugging in a Node project but toggles full screen in other projects.

@weinand
Copy link
Contributor

weinand commented Apr 13, 2022

Yes, it is unfortunate that F11 is the shortcut for workbench.action.toggleFullScreen and "Start Debugging".
I suggest that you change the keyboard for workbench.action.toggleFullScreen.

@weinand weinand assigned connor4312 and unassigned weinand Apr 13, 2022
@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues labels Apr 13, 2022
@RadhiRasho
Copy link
Author

Is there no way of having it go into "Start Debugging" mode when a specific condition is met? Something like when: isDebugOn?
I typically have the auto attach feature set to With Flag so that when I run an npm script with --inspect it automatically activates debug mode.

Another option is to have F11 start debugging if the user is in the Debug tab of the sidebar. Just ideas, not something that is really needed, sense it isn't causing any urgent issues.

@connor4312
Copy link
Member

Ultimately this will still cause a conflict for users who both want to toggle fullscreen and do use debugging. So we should relocate or specify one keybinding or the other...

@connor4312
Copy link
Member

Reviewing this, looks like we have both "F10" and "F11" as keybindings. Unfortunately we don't have a way to differentiate which keybinding triggered entering debug mode in our telemetry, and a sizable number of users (>10K) have used one of these keybindings recently, so I don't just want to boot one of those off.

I like the compromise of only running the command on F11 when the debug view is the active viewlet.

@aeschli
Copy link
Contributor

aeschli commented May 31, 2022

Verified that F11 only starts debugging if the debug view is visible (also if not active)

@aeschli aeschli added the verified Verification succeeded label May 31, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants