Skip to content

Commit da93a68

Browse files
committed
Do not automatically close active serial port monitors when the "native" development platform is used // Issue platformio#2623
1 parent 5be41d6 commit da93a68

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Release Notes
22

3-
## 3.0.1 (2023-??-??)
3+
## 3.1.0 (2023-??-??)
44

55
* Add support for the ``${command:platformio-ide.activeEnvironment}`` variable that can be used in a custom [PlatformIO Toolbar](https://docs.platformio.org/en/latest/integration/ide/vscode.html#platformio-toolbar) and [VSCode variable substitution](https://code.visualstudio.com/docs/editor/variables-reference) (issue [#3588](https://github.com/platformio/platformio-vscode-ide/issues/3588))
66
* Focus on the project configuration output tab only on error (issue [#3535](https://github.com/platformio/platformio-vscode-ide/issues/3535))
7+
* Do not automatically close active serial port monitors when the "native" development platform is used (issue [#2623](https://github.com/platformio/platformio-vscode-ide/issues/2623))
78
* Fixed an issue with a task runner on Windows 7 (issue [#3481](https://github.com/platformio/platformio-vscode-ide/issues/3481))
89
* Fixed "Select All", "Undo", and "Redo" operations on macOS for PIO Home (pull [#3451](https://github.com/platformio/platformio-vscode-ide/pull/3451))
910
* Fixed an issue when the "Upload & Monitor" task selects the wrong environment (issue [#2623](https://github.com/platformio/platformio-vscode-ide/issues/2623))

src/project/tasks.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export default class ProjectTaskManager {
160160
this._autoCloseSerialMonitor(event.execution.task);
161161
}
162162

163-
_autoCloseSerialMonitor(startedTask) {
163+
async _autoCloseSerialMonitor(startedTask) {
164164
if (startedTask.definition.type !== ProjectTaskManager.PROVIDER_TYPE) {
165165
return;
166166
}
@@ -177,6 +177,14 @@ export default class ProjectTaskManager {
177177
return;
178178
}
179179

180+
// skip "native" dev-platform
181+
const platform = (await this.projectObserver.getConfig()).getEnvPlatform(
182+
await this.projectObserver.revealActiveEnvironment()
183+
);
184+
if (platform === 'native') {
185+
return;
186+
}
187+
180188
vscode.tasks.taskExecutions.forEach((event) => {
181189
const isCurrentEvent = this.areTasksEqual(this._startedTask, event.task);
182190
const skipConds = [

0 commit comments

Comments
 (0)