Skip to content

How to detect that VS Code Extension is run in Theia IDE? #14396

Answered by msujew
MarshalX asked this question in Q&A
Discussion options

You must be logged in to vote

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 the product.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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MarshalX
Comment options

@tsmaeder
Comment options

Answer selected by MarshalX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants