Microsoft/vscode

Windows: unable to bring window to front even when trying to steal focus

Aberta

#251.849 aberto em 18 de jun. de 2025

 (3 comentários) (1 reação) (1 responsável)TypeScript (39.847 forks)batch import
bugconfirmedelectronhelp wantedupstreamworkbench-window

Métricas do repositório

Stars
 (184.936 estrelas)
Métricas de merge de PR
 (Mesclagem média 11h 43m) (1.000 fundiu PRs em 30d)

Description

  • VS Code Version: 1.101.0
  • OS Version: Windows 11 Pro (26100.4349)

Steps to Reproduce:

  1. I am developing a vscode extension. The VSCode extension spawns a child process, and debugs said process. In windows I see that after I hit the breakpoint, the vscode can not become the current foreground windows, and only flashes on the windows status bar. (same repro as this old issue)

  2. I have verified the breakpoint in the below image hits in the F1 debugger, and routes down correctly into the electron API. Image

There are several solutions suggested on the electron issues board that could solve the problem for vscode. The final suggested solution, in short: minimize, show, setAlwaysOnTop, THEN focus.

Guia do colaborador