Ticket Created
over 2 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