Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit 42d788f

Browse files
Merge pull request #255 from microsoft/users/t-xunguy/dev-update
Fix merge conflicts on dev
2 parents f1f1072 + 1b79fbf commit 42d788f

File tree

4 files changed

+29
-5
lines changed

4 files changed

+29
-5
lines changed

package-lock.json

Lines changed: 12 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
"category": "%deviceSimulatorExpressExtension.commands.common.label%"
6262
},
6363
{
64-
6564
"command": "deviceSimulatorExpress.common.openSerialMonitor",
6665
"title": "%deviceSimulatorExpressExtension.commands.common.openSerialMonitor%",
6766
"category": "%deviceSimulatorExpressExtension.commands.common.label%"

src/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export const CONSTANTS = {
6969
"error.installationError",
7070
"Installation Error"
7171
),
72+
7273
INVALID_FILE_EXTENSION_DEBUG: localize(
7374
"error.invalidFileExtensionDebug",
7475
"The file you tried to run isn't a Python file."

src/extension.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,22 @@ export async function activate(context: vscode.ExtensionContext) {
921921
}
922922
);
923923

924+
const showReleaseNote = vscode.commands.registerCommand(
925+
"deviceSimulatorExpress.",
926+
(port, showWarning = true) => {
927+
if (serialMonitor) {
928+
telemetryAI.runWithLatencyMeasure(() => {
929+
serialMonitor.closeSerialMonitor(port, showWarning);
930+
}, TelemetryEventName.COMMAND_SERIAL_MONITOR_CLOSE);
931+
} else {
932+
vscode.window.showErrorMessage(
933+
CONSTANTS.ERROR.NO_FOLDER_OPENED
934+
);
935+
console.info("Serial monitor is not defined.");
936+
}
937+
}
938+
);
939+
924940
UsbDetector.getInstance().initialize(context.extensionPath);
925941
UsbDetector.getInstance().startListening();
926942

0 commit comments

Comments
 (0)