Ticket Created
over 3 years ago

CIQQA-525

VS Code output window steals focus from editor

Environment

- Windows

- VS Code 1.58.2

- CIQ SDK 4.0.4

- Monkey Extension 0.1.13

Observations

App output (from System.println()) causes the output window to steal focus from the current editor. This makes it impossible to output something once per second (for example).

Someone else complained about this to Microsoft years ago, and it seems that the solution is for the extension to set "preserveFocus: true" on the OutputChannel.

https://github.com/microsoft/vscode/issues/31474#issuecomment-319032829

https://github.com/microsoft/vscode/blob/67ea45c3e00a70fc668c19bbaf3ea565bc8c74d4/src/vs/vscode.d.ts#L5554-L5558

Recreation Procedure

1) Create new simple data field

2) Add System.println("42") to compute() (which runs roughly every second)

3) Run app

4) Attempt to edit any file while the app is running. It won't be possible as the output window will keep losing focus

Parents
  • "This makes it impossible to output something once per second (for example)."

    To rephrase this:

    This makes it impractical/annoying to print debug output once per second (for example), because it will be impossible to to use VS Code while this is happening.

Comment
  • "This makes it impossible to output something once per second (for example)."

    To rephrase this:

    This makes it impractical/annoying to print debug output once per second (for example), because it will be impossible to to use VS Code while this is happening.

Children