Skip to content

Commit f6a4360

Browse files
add doc about vscode behaviors
Signed-off-by: nkomonen-amazon <[email protected]>
1 parent 8d6679c commit f6a4360

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/vscode_behaviors.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# VS Code Behaviors
2+
3+
Many VS Code behavoirs for certain APIs or user interactions with the IDE are not clearly documented,
4+
or documented at all. Please add any findings to this document.
5+
6+
## `deactivate()` - extension shutdown
7+
8+
This method is defined as part of the VS Code extension API, and is run on a **graceful** shutdown
9+
for each extension.
10+
11+
- Our extension and its `deactivate()` function are in the Extension Host process [1]
12+
- The Extension Host process has at most 5 seconds to shut down, after which it will exit. [1]
13+
- The vscode API will be unreliable at deactivation time. So certain VSC APIs like the filesystem may not work. [1]
14+
- The VSC Filesystem API has been confirmed to not work
15+
- In `Run & Debug` mode, closing the Debug IDE instance behaves differently depending on how it is closed
16+
- The regular close button in the Debug IDE instance results in a graceful shutdown
17+
- The red square in the root IDE instance to stop the debugging session results on a non-graceful shutdown, meaning `deactivate()` is not run.
18+
19+
Sources:
20+
21+
- [[1]](https://github.com/Microsoft/vscode/issues/47881#issuecomment-381910587)
22+
- [[2]](https://github.com/microsoft/vscode/issues/122825#issuecomment-814218149)

0 commit comments

Comments
 (0)