-
Hi! I am VS Code extension dev. I want to understand in my codebase in which IDE extension was run. How I can do it? Will be it okay to check something like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @MarshalX, Generally we attempt to act as VS Code. However, I assume there are quite a few things that we accidentally expose. For example, the There is no real API for checking whether the app runs in VS Code or Theia. |
Beta Was this translation helpful? Give feedback.
Hey @MarshalX,
Generally we attempt to act as VS Code. However, I assume there are quite a few things that we accidentally expose. For example, the
vscode.env.appRoot
variable points to the current Theia instance. In there, files that are only used in VS Code (like theproduct.json
) will be missing. As for the environment variables: I don't assume that any env variables that we push into the extension host are subject to change, so you're likely fine with depending on them.There is no real API for checking whether the app runs in VS Code or Theia.