From 699feb58ec638f2ba07b904d2b06a585b71e5e30 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Wed, 26 Jul 2023 10:47:54 -0400 Subject: [PATCH 1/3] Add deleteDevChannelBeforeInstall launch option --- package-lock.json | 14 +++++++------- package.json | 7 ++++++- src/DebugConfigurationProvider.ts | 4 +++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2bb8cf0..70be539d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "node-ssdp": "^4.0.0", "postman-request": "^2.88.1-postman.32", "pretty-bytes": "^5.6.0", - "roku-debug": "^0.20.2", + "roku-debug": "^0.20.3", "roku-deploy": "^3.10.3", "roku-test-automation": "^2.0.0-beta.19", "semver": "^7.1.3", @@ -9002,9 +9002,9 @@ } }, "node_modules/roku-debug": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/roku-debug/-/roku-debug-0.20.2.tgz", - "integrity": "sha512-ig/EMLi11e6VPPmFaaij73KX9Ba7ZtQkcG74pthx1jgR4SaPJJUHFqXTkDpYov0RgA7luBjLUyvMB/4lUiN4zg==", + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/roku-debug/-/roku-debug-0.20.3.tgz", + "integrity": "sha512-hrInaz7X7DWs6S8cfy8hsqeE8F7kDdxMpYWa6OVlkfeX5lWDZuNfwWhfAUntuNMpdCTMMKxWX270BndU9deM+Q==", "dependencies": { "@rokucommunity/logger": "^0.3.3", "@types/request": "^2.48.8", @@ -18475,9 +18475,9 @@ } }, "roku-debug": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/roku-debug/-/roku-debug-0.20.2.tgz", - "integrity": "sha512-ig/EMLi11e6VPPmFaaij73KX9Ba7ZtQkcG74pthx1jgR4SaPJJUHFqXTkDpYov0RgA7luBjLUyvMB/4lUiN4zg==", + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/roku-debug/-/roku-debug-0.20.3.tgz", + "integrity": "sha512-hrInaz7X7DWs6S8cfy8hsqeE8F7kDdxMpYWa6OVlkfeX5lWDZuNfwWhfAUntuNMpdCTMMKxWX270BndU9deM+Q==", "requires": { "@rokucommunity/logger": "^0.3.3", "@types/request": "^2.48.8", diff --git a/package.json b/package.json index 4ace40d0..a0fb18a3 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "node-ssdp": "^4.0.0", "postman-request": "^2.88.1-postman.32", "pretty-bytes": "^5.6.0", - "roku-debug": "^0.20.2", + "roku-debug": "^0.20.3", "roku-deploy": "^3.10.3", "roku-test-automation": "^2.0.0-beta.19", "semver": "^7.1.3", @@ -794,6 +794,11 @@ ], "default": "log", "description": "The level of logging that should be done during a debug session." + }, + "deleteDevChannelBeforeInstall": { + "type": "boolean", + "default": false, + "description": "Delete any currently installed dev channel before starting the debug session" } } } diff --git a/src/DebugConfigurationProvider.ts b/src/DebugConfigurationProvider.ts index 1d9c9b25..d14b3710 100644 --- a/src/DebugConfigurationProvider.ts +++ b/src/DebugConfigurationProvider.ts @@ -51,7 +51,8 @@ export class BrightScriptDebugConfigurationProvider implements DebugConfiguratio packagePort: 80, enableDebugProtocol: false, remotePort: 8060, - rendezvousTracking: true + rendezvousTracking: true, + deleteDevChannelBeforeInstall: false }; let config: any = vscode.workspace.getConfiguration('brightscript') || {}; @@ -241,6 +242,7 @@ export class BrightScriptDebugConfigurationProvider implements DebugConfiguratio config.enableDebugProtocol = config.enableDebugProtocol ? true : false; config.cwd = folderUri.fsPath; config.rendezvousTracking = config.rendezvousTracking === false ? false : true; + config.deleteDevChannelBeforeInstall = config.deleteDevChannelBeforeInstall === false ? false : true; if (config.request !== 'launch') { await vscode.window.showErrorMessage(`roku-debug only supports the 'launch' request type`); From bcdebf1aaba127494006977e8fce7567cf62bde9 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Wed, 26 Jul 2023 12:06:06 -0400 Subject: [PATCH 2/3] Default deleteDevChannelBeforeInstall to false instead of true --- src/DebugConfigurationProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DebugConfigurationProvider.ts b/src/DebugConfigurationProvider.ts index d14b3710..972106be 100644 --- a/src/DebugConfigurationProvider.ts +++ b/src/DebugConfigurationProvider.ts @@ -242,7 +242,7 @@ export class BrightScriptDebugConfigurationProvider implements DebugConfiguratio config.enableDebugProtocol = config.enableDebugProtocol ? true : false; config.cwd = folderUri.fsPath; config.rendezvousTracking = config.rendezvousTracking === false ? false : true; - config.deleteDevChannelBeforeInstall = config.deleteDevChannelBeforeInstall === false ? false : true; + config.deleteDevChannelBeforeInstall = config.deleteDevChannelBeforeInstall === true; if (config.request !== 'launch') { await vscode.window.showErrorMessage(`roku-debug only supports the 'launch' request type`); From 632b1876157dff9d7f68c9e8665bc95579782c10 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Wed, 26 Jul 2023 12:17:14 -0400 Subject: [PATCH 3/3] Add entry in userSettings for this new option --- package.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package.json b/package.json index a0fb18a3..00f61e58 100644 --- a/package.json +++ b/package.json @@ -2244,6 +2244,12 @@ "description": "Should rendezvous tracking be enabled on launch? If `true`: turn on ECP rendezvous tracking, or turn on 8080 rendezvous tracking if ECP unsupported. If `false`, turn off both.", "default": true, "scope": "resource" + }, + "brightscript.debug.deleteDevChannelBeforeInstall": { + "type": "boolean", + "default": false, + "description": "Delete any currently installed dev channel before starting the debug session", + "scope": "resource" } } },