diff --git a/CHANGELOG.md b/CHANGELOG.md index dcb37049c7..cfb0f29126 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Features: Bug Fixes: +- Fix "CMake: Run Without Debugging" not changing the working directory when the build directory changes. [#4549](https://github.com/microsoft/vscode-cmake-tools/issues/4549) - Fix CMake script path links not working in CHS/CSY/FRA/PLK locales due to localized quotes. [#4383](https://github.com/microsoft/vscode-cmake-tools/issues/4383) - Fix user-level tasks defined in `~/.config/Code/User/tasks.json` causing infinite spinner. [#4659](https://github.com/microsoft/vscode-cmake-tools/pull/4659) - Fix `cmake.compileFile` failing to find compilation info when using presets without `CMAKE_EXPORT_COMPILE_COMMANDS`. [#4484](https://github.com/microsoft/vscode-cmake-tools/issues/4484) diff --git a/src/cmakeProject.ts b/src/cmakeProject.ts index afea14ba4a..558f226c36 100644 --- a/src/cmakeProject.ts +++ b/src/cmakeProject.ts @@ -3024,8 +3024,9 @@ export class CMakeProject { if (launchBehavior !== "newterminal") { for (const [, terminal] of this.launchTerminals) { const creationOptions = terminal.creationOptions! as vscode.TerminalOptions; - // If the environment has changed at all since the last run, dispose of this terminal - if (JSON.stringify(creationOptions.env) !== JSON.stringify(options.env)) { + // If the environment or working directory has changed at all since the last run, dispose of this terminal + if (JSON.stringify(creationOptions.env) !== JSON.stringify(options.env) || + JSON.stringify(creationOptions.cwd) !== JSON.stringify(options.cwd)) { terminal.dispose(); break; }