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

Debug toolbar not appearing #194974

Closed
jlj-ee opened this issue Oct 6, 2023 · 19 comments
Closed

Debug toolbar not appearing #194974

jlj-ee opened this issue Oct 6, 2023 · 19 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *not-reproducible Issue cannot be reproduced by VS Code Team member as described
Milestone

Comments

@jlj-ee
Copy link

jlj-ee commented Oct 6, 2023

Does this issue occur when all extensions are disabled?: Need language support extensions to be able to launch the debug session, but I have tried the minimal cases (just C/C++ Extension for debugging a C file, just Python extension for debugging a Python file).

Version: 1.83.0 (user setup)
Commit: e7e0370
Date: 2023-10-03T16:12:16.321Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045

Steps to Reproduce:

  1. Start a debug session. I tried both Python and C.
  2. Debug toolbar does not appear for any location setting, including the default floating. Inspecting with the Developer Tools shows that the element is not present.
  3. Debug session runs as normal and can be controlled by entries in the Run menu or keyboard shortcuts, but the debug toolbar never appears.

image

Today is the first time this has ever happened after months of daily use. Another PC running the same version of VS Code with synced settings and extensions does NOT have this issue, nor does a fresh installation of the Insider's build. I tried a complete clean reinstall of VS Code 1.83.0, including deleting all appdata/userprofile files, but the issue remains through multiple restarts and relaunches.

@gjsjohnmurray
Copy link
Contributor

What values do you have for the following settings?

  • debug.toolBarLocation
  • window.commandCenter
  • window.titleBarStyle

@jlj-ee
Copy link
Author

jlj-ee commented Oct 6, 2023

All are set to their defaults:

  • debug.toolBarLocation: "floating"
  • window.commandCenter: true
  • window.titleBarStyle: "custom"

@gjsjohnmurray
Copy link
Contributor

If you set its location to "docked" does it show up in the titlebar of the Run and Debug view when you start debugging? Or if you set it to "commandCenter" does it appear there?

@jlj-ee
Copy link
Author

jlj-ee commented Oct 6, 2023

Thanks for the follow-up. No, no location setting yields a visible toolbar on this workstation.
My second workstation running the identical version of VS Code and with all extensions and settings synced does not repro this issue.

The "Window" output on the workstation with the issue shows the following error when I start stop a debug session with debug.toolBarLocation as floating:

2023-10-06 09:43:04.666 [error] Cannot read properties of undefined (reading 'closeOnEnd'): TypeError: Cannot read properties of undefined (reading 'closeOnEnd')
    at u.value (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1887:71844)
    at c.z (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902)
    at c.A (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1972)
    at c.fire (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2188)
    at R.W (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1885:25076)
    at u.value (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1885:24967)
    at c.z (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902)
    at c.fire (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119)
    at u.M (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:913:36807)
    at u.L (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:913:36654)
    at async u.K (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:913:36517)
    at async R.terminate (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1885:9161)
    at async G (vscode-file://vscode-app/c:/Users/<user>/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1887:41375)

Please let me know if there are any other outputs/logs I can generate to pass on.

@roblourens
Copy link
Member

roblourens commented Oct 6, 2023

Thanks for the error. That looks like it would appear when debugging stops, not when it starts. But it indictates the possible problem, that we got an undefined value for the debug settings section, which shouldn't happen here.

Can you try clearing your whole settings.json file and trying it again? Sounds like maybe you tried that but I see settings in your screenshot so I want to check.

And no other errors in the Window log or devtools console?

@roblourens roblourens added the info-needed Issue requires more information from poster label Oct 6, 2023
@jlj-ee
Copy link
Author

jlj-ee commented Oct 6, 2023

Thanks for the correction on the timing of that error, I can confirm that it is when the debug session stops, not starts, and have edited my comment.

I did try clearing the settings.json file; no luck.

The devtools console and Window log also show this error:
image

@jlj-ee
Copy link
Author

jlj-ee commented Nov 10, 2023

Any further info on this? The issue has persisted for me through multiple VS Code updates.

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues and removed info-needed Issue requires more information from poster labels Dec 15, 2023
@roblourens roblourens added this to the December / January 2024 milestone Dec 15, 2023
@roblourens
Copy link
Member

I'll try to add some logging or something here, still not sure what is going on though.

@connor4312
Copy link
Member

yea, I don't think that error is related. I reproduced it by setting debug.console: null in my settings and got that error, but I didn't lose the debug toolbar.

In the screenshot in #194974 (comment), the .debug-toolbar is not in the DOM at all. That could only (to my reading) happen without errors if these checks never pass (if we show the debug toolbar once, it's never removed from the DOM, only hidden). But I don't see how any of those would both happen across adapters and also with fresh settings.

if (
state === State.Inactive ||
toolBarLocation !== 'floating' ||
this.debugService.getModel().getSessions().every(s => s.suppressDebugToolbar) ||
(state === State.Initializing && this.debugService.initializingOptions?.suppressDebugToolbar)
) {

@roblourens roblourens modified the milestones: December / January 2024, February 2024 Jan 24, 2024
@jlj-ee
Copy link
Author

jlj-ee commented Feb 9, 2024

Thanks for continuing to track this. Just want to note that this issue persists for me.
A colleague is also experiencing it from the very first time they tried to start a debug session on a completely fresh install of VS Code on a reimaged Windows 10 PC.

@sketchbuch
Copy link

sketchbuch commented Feb 10, 2024

I also noticed recently when launching my extension that the debug toolbar appears, but something causes it to disappear and I have to close the launched instance of vscode and relaunch as the toolbar is gone.

This only stared happening sometime this year (2024).

To reproduce, in my case: launch the extension I'm working on. Toolbar appears. Click reload, toolbar reappears. Click reload again, toolbar does not reappear. If I then close the launched window and re-run the launcher the toolbar never reappears until I restart vscode.

  • debug.toolBarLocation: floating
  • window.commandCenter: true
  • window.titleBarStyle: native

System:

  • VSCode: 1.86.1
  • Electron: 27.2.3
  • ElectronBuildId: 26495564
  • Chromium: 118.0.5993.159
  • Node.js: 18.17.1
  • V8: 11.8.172.18-electron.0
  • OS: Ubuntu 22.04 (Linux x64 6.5.0-10022-tuxedo)

@sketchbuch
Copy link

Here you can see that it disappears after reloading twice and then never reappears:
Debug Toolbar Disappears.zip

@roblourens
Copy link
Member

@jlj-ee is your issue fixed in Insiders? It might have been helped by #204265, although yours might be different.

The others, I think your issue should be fixed in Insiders now.

@sketchbuch
Copy link

sketchbuch commented Feb 19, 2024

Just tried insiders v1.87.0 and my issue is still present.

Launching my extension to test it, click reload a few time on the toolbar and the toolbar disappears. My issue is not that the toolbar appears on the top left. @roblourens

@roblourens roblourens modified the milestones: February 2024, March 2024 Feb 21, 2024
@roblourens roblourens modified the milestones: March 2024, April 2024 Mar 26, 2024
@connor4312
Copy link
Member

Benjamin filed this issue which is my best guess as to what's going on: the debug toolbar at some point got a position outside of the window and we never constrain its position to restore it to be within the window. I'm going to merge that into this issue and apply a hopeful fix for that.

@connor4312 connor4312 self-assigned this Mar 28, 2024
@connor4312
Copy link
Member

connor4312 commented Mar 28, 2024

actually, nevermind, we do restrain it when the window is first loaded. That's not it 😕

@tjx666
Copy link
Contributor

tjx666 commented Apr 3, 2024

@connor4312

I also occurs this issue when I debug a vscode extension, reproduce:

  1. git clone [email protected]:tjx666/package-manager-enhancer.git and pnpm install
  2. click debug button to open debug window
  3. open another folder in debug window
  4. click restart button, the debug toolbar disappear, but I can see the debug buttons in apple touch bar
Version: 1.88.0-insider (Universal)
Commit: 57028e3d274ebde851c7cc02123def372ca619a6
Date: 2024-04-03T04:45:14.890Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.4.0

@connor4312
Copy link
Member

Your case was #203472. I don't think that is what this issue is about.

@connor4312 connor4312 modified the milestones: April 2024, Backlog Apr 22, 2024
@connor4312 connor4312 added the *not-reproducible Issue cannot be reproduced by VS Code Team member as described label Dec 19, 2024
Copy link

We closed this issue because we are unable to reproduce the problem with the steps you describe. Chances are we've already fixed your problem in a recent version of VS Code. If not, please ask us to reopen the issue and provide us with more detail. Our issue reporting guidelines might help you with that.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *not-reproducible Issue cannot be reproduced by VS Code Team member as described
Projects
None yet
Development

No branches or pull requests

6 participants