Skip to content

Commit

Permalink
Add fileLogging launch.json optoin
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron committed May 31, 2023
1 parent 7eff981 commit 5e6472d
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
117 changes: 117 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,123 @@
]
}
},
"fileLogging": {
"oneOf": [
{
"type": "object",
"description": "Configure file logging for debug console logs as well as RokuCommunity debugger logs",
"default": {
"dir": "${workspaceFolder}/logs",
"rokuDevice": {
"enabled": true,
"filename": "rokuDevice.log",
"mode": "session",
"logLimit": 5
},
"debugger": {
"enabled": true,
"filename": "debugger.log",
"mode": "session",
"logLimit": 5
}
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Should file logging be enabled"
},
"dir": {
"type": "string",
"description": "Directory where log files should be stored. used when filename is relative",
"default": "${workspaceFolder}/logs"
},
"logLimit": {
"type": "number",
"description": "The number of log files to keep. `null` means keep all logs",
"default": null
},
"rokuDevice": {
"oneOf": [
{
"type": "object",
"description": "File logging for the telnet or IO output from the Roku device currently being debugged. (i.e. all the stuff produced by `print` statements in your code)",
"properties": {
"enabled": {
"type": "boolean",
"description": "Should file logging be enabled"
},
"dir": {
"type": "string",
"description": "Directory where log files should be stored. used when filename is relative",
"default": "${workspaceFolder}/logs"
},
"logLimit": {
"type": "number",
"description": "The number of log files to keep. `null` means keep all logs",
"default": null
},
"mode": {
"type": "string",
"description": "`'session'` means a unique timestamped file will be created on every debug session.`'append'` means all logs will be appended to a single file",
"default": "session",
"enum": [
"session",
"append"
]
}
}
},
{
"type": "boolean",
"description": "Enable file logging for debug console logs as well as RokuCommunity debugger logs"
}
]
},
"debugger": {
"oneOf": [
{
"type": "object",
"description": "File logging for the debugger. Mostly used to provide crash logs to the RokuCommunity team.",
"properties": {
"enabled": {
"type": "boolean",
"description": "Should file logging be enabled"
},
"dir": {
"type": "string",
"description": "Directory where log files should be stored. used when filename is relative",
"default": "${workspaceFolder}/logs"
},
"logLimit": {
"type": "number",
"description": "The number of log files to keep. `null` means keep all logs",
"default": null
},
"mode": {
"type": "string",
"description": "`'session'` means a unique timestamped file will be created on every debug session.`'append'` means all logs will be appended to a single file",
"default": "session",
"enum": [
"session",
"append"
]
}
}
},
{
"type": "boolean",
"description": "Enable file logging for debug console logs as well as RokuCommunity debugger logs"
}
]
}
}
},
{
"type": "boolean",
"description": "Enable file logging for debug console logs as well as RokuCommunity debugger logs"
}
]
},
"outDir": {
"type": "string",
"description": "The folder where the the build artifacts are placed (like the staging folder and .zip files of the apps)",
Expand Down
1 change: 1 addition & 0 deletions src/DebugConfigurationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ export class BrightScriptDebugConfigurationProvider implements DebugConfiguratio
config.remotePort = config.remotePort ? config.remotePort : this.configDefaults.remotePort;
config.logfilePath ??= null;
config.enableDebugProtocol = config.enableDebugProtocol ? true : false;
config.cwd = folderUri.fsPath;

Check failure on line 241 in src/DebugConfigurationProvider.ts

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest)

Property 'cwd' does not exist on type 'BrightScriptLaunchConfiguration'.

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

0 comments on commit 5e6472d

Please sign in to comment.