Skip to content

Commit

Permalink
Add deleteDevChannelBeforeInstall launch option (#494)
Browse files Browse the repository at this point in the history
* Add deleteDevChannelBeforeInstall launch option

* Default deleteDevChannelBeforeInstall to false instead of true

* Add entry in userSettings for this new option
  • Loading branch information
TwitchBronBron committed Jul 26, 2023
1 parent 2bed0c8 commit cffe49c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
}
}
Expand Down Expand Up @@ -2239,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"
}
}
},
Expand Down
4 changes: 3 additions & 1 deletion src/DebugConfigurationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') || {};
Expand Down Expand Up @@ -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 === true;

if (config.request !== 'launch') {
await vscode.window.showErrorMessage(`roku-debug only supports the 'launch' request type`);
Expand Down

0 comments on commit cffe49c

Please sign in to comment.