diff --git a/changelog.d/+explicitly-disable-from-env.added.md b/changelog.d/+explicitly-disable-from-env.added.md new file mode 100644 index 00000000..175f9795 --- /dev/null +++ b/changelog.d/+explicitly-disable-from-env.added.md @@ -0,0 +1 @@ +Setting `MIRRORD_ACTIVE=0` environment variable will explicitly disable mirrord. diff --git a/src/debugger.ts b/src/debugger.ts index f5ff2f7f..135cedec 100644 --- a/src/debugger.ts +++ b/src/debugger.ts @@ -81,7 +81,7 @@ async function main( folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, _token: vscode.CancellationToken): Promise { - if (!globalContext.workspaceState.get('enabled') && !(config.env?.["MIRRORD_ACTIVE"] === "1")) { + if ((!globalContext.workspaceState.get('enabled') && !(config.env?.["MIRRORD_ACTIVE"] === "1")) || config.env?.["MIRRORD_ACTIVE"] === "0") { return config; }