Skip to content

Commit 9e07fd6

Browse files
CopilotOmotolahanniavalera
authored
Fix cmake.revealLog "focus" mode not revealing the output panel (#4824)
* Initial plan * Fix cmake.revealLog "focus" mode not revealing the output panel (#4471) Co-authored-by: Omotola <[email protected]> * Fix cmake.revealLog "focus" not revealing output panel on configure success (#4471) Co-authored-by: Omotola <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Omotola <[email protected]> Co-authored-by: Omotola <[email protected]> Co-authored-by: Hannia Valera <[email protected]>
1 parent e5ad7b2 commit 9e07fd6

4 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Improvements:
3131
- Honor `debugger.workingDirectory` from the CMake File API when debugging a target, so that the `DEBUGGER_WORKING_DIRECTORY` target property is used as the debugger working directory. [#4595](https://github.com/microsoft/vscode-cmake-tools/issues/4595)
3232

3333
Bug Fixes:
34+
- Fix `cmake.revealLog` set to `"focus"` not revealing the output panel or stealing focus. The output channel now correctly appears and takes focus on both configure success and failure when this setting is used. [#4471](https://github.com/microsoft/vscode-cmake-tools/issues/4471)
3435
- Fix `${command:cmake.selectConfigurePreset}` (and other preset/kit selection commands) failing with "command did not return a result of type string" when used in `tasks.json` as a command variable. The commands now return the selected preset or kit name instead of a boolean. [#4239](https://github.com/microsoft/vscode-cmake-tools/issues/4239)
3536
- Fix renaming a CMake project creating a duplicate node in the Project Outline instead of replacing the existing one. [#4343](https://github.com/microsoft/vscode-cmake-tools/issues/4343)
3637
- Remove internal stack traces from the Output pane when a subprocess fails. Error messages now show only human-readable information; stack traces are still available in debug-level logging. [#4807](https://github.com/microsoft/vscode-cmake-tools/issues/4807)

docs/cmake-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Options that support substitution, in the table below, allow variable references
7474
| `cmake.postRunCoverageTarget` | Target to build after running tests with coverage using the test explorer. | `null` | no |
7575
| `cmake.preferredGenerators` | A list of strings of generator names to try, in order, when configuring a CMake project for the first time. | `[]` | no |
7676
| `cmake.preRunCoverageTarget` | Target to build before running tests with coverage using the test explorer. | `null` | no |
77-
| `cmake.revealLog` | Controls when the CMake output log should be revealed. | `always` | no |
77+
| `cmake.revealLog` | Controls when the CMake output log should be revealed. Possible values: `focus` (show the log and move focus to the output channel), `always` (show the log but do not move focus), `never` (do not show the log), `error` (show the log only when an error occurs). | `always` | no |
7878
| `cmake.saveBeforeBuild` | If `true` (the default), saves open text documents when build or configure is invoked before running CMake. | `true` | no |
7979
| `cmake.setBuildTargetSameAsLaunchTarget` | If `true`, setting the launch/debug target automatically sets the build target to match. | `false` | no |
8080
| `cmake.setBuildTypeOnMultiConfig` | If `true`, set build type on multi-config generators. | `false` | no |

src/cmakeProject.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,6 +1700,7 @@ export class CMakeProject {
17001700
}
17011701

17021702
if (type !== ConfigureType.ShowCommandOnly) {
1703+
log.showChannel();
17031704
log.info(localize('run.configure', 'Configuring project: {0}', this.folderName), extraArgs);
17041705
}
17051706

src/logging.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ export class Logger {
264264
should_show = error_to_show;
265265
}
266266
const should_focus = (reveal_log === 'focus');
267+
if (should_focus) {
268+
should_show = true;
269+
}
267270

268271
if (should_show) {
269272
SingletonLogger.instance().showChannel(!should_focus);

0 commit comments

Comments
 (0)