Skip to content

Use new vsc API to activate terminal without running any commands in terminal #11039

Closed
@DonJayamanne

Description

@DonJayamanne

Contribute to terminal environments

This new API allows extensions to change environment variables when the terminal is starting up.

  • Support terminal activation for debugger without running Commands in terminal
  • Running python in terminal will user correct environment even when terminal is already open
  • Not polluting terminal history with unnecessary commands
  • expose .env variables into terminal without activation of environment
const collection = window.getEnvironmentVariableCollection(true);
const separator = process.platform === 'win32' ? ';' : ':';
collection.prepend('PATH', `/foo${separator}`);
collection.replace('JAVA_HOME', '/bar');

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions