From 95b6326ca07b9af4b0088dc3064d92462cd664d3 Mon Sep 17 00:00:00 2001 From: vincentsong Date: Sat, 18 Jan 2025 09:22:06 +1100 Subject: [PATCH 1/2] feat: Added VS Code debugging support with webview build --- .changeset/plenty-suits-visit.md | 5 +++++ .vscode/launch.json | 17 ++++++++++++++--- .vscode/tasks.json | 15 +++++++++++++++ src/extension.ts | 6 +++--- 4 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 .changeset/plenty-suits-visit.md diff --git a/.changeset/plenty-suits-visit.md b/.changeset/plenty-suits-visit.md new file mode 100644 index 0000000..8174644 --- /dev/null +++ b/.changeset/plenty-suits-visit.md @@ -0,0 +1,5 @@ +--- +"roo-cline": patch +--- + +debug from vscode and changed output channel to Roo-Cline diff --git a/.vscode/launch.json b/.vscode/launch.json index 9032340..2b795ee 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,9 +9,20 @@ "name": "Run Extension", "type": "extensionHost", "request": "launch", - "args": ["--extensionDevelopmentPath=${workspaceFolder}"], + "runtimeExecutable": "${execPath}", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}", + ], "outFiles": ["${workspaceFolder}/dist/**/*.js"], - "preLaunchTask": "${defaultBuildTask}" - } + "preLaunchTask": "compile", + "env": { + "NODE_ENV": "development", + "VSCODE_DEBUG_MODE": "true" + }, + "resolveSourceMapLocations": [ + "${workspaceFolder}/**", + "!**/node_modules/**" + ] + }, ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index e141383..f71286c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,6 +3,21 @@ { "version": "2.0.0", "tasks": [ + { + "label": "compile", + "type": "npm", + "script": "compile", + "dependsOn": ["npm: build:webview"], + "group": { + "kind": "build", + "isDefault": true + }, + "presentation": { + "reveal": "silent", + "panel": "shared" + }, + "problemMatcher": ["$tsc", "$eslint-stylish"] + }, { "label": "watch", "dependsOn": ["npm: build:webview", "npm: watch:tsc", "npm: watch:esbuild"], diff --git a/src/extension.ts b/src/extension.ts index 31ba8a7..6729152 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -21,10 +21,10 @@ let outputChannel: vscode.OutputChannel // This method is called when your extension is activated // Your extension is activated the very first time the command is executed export function activate(context: vscode.ExtensionContext) { - outputChannel = vscode.window.createOutputChannel("Cline") + outputChannel = vscode.window.createOutputChannel("Roo-Cline") context.subscriptions.push(outputChannel) - outputChannel.appendLine("Cline extension activated") + outputChannel.appendLine("Roo-Cline extension activated") // Get default commands from configuration const defaultCommands = vscode.workspace @@ -165,5 +165,5 @@ export function activate(context: vscode.ExtensionContext) { // This method is called when your extension is deactivated export function deactivate() { - outputChannel.appendLine("Cline extension deactivated") + outputChannel.appendLine("Roo-Cline extension deactivated") } From f6f7b5158315076b62057da78191be41854efed7 Mon Sep 17 00:00:00 2001 From: vincentsong Date: Sat, 18 Jan 2025 19:22:31 +1100 Subject: [PATCH 2/2] fix: make watch non-default task and stress sourcemap true --- .vscode/launch.json | 1 + .vscode/tasks.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 2b795ee..ead1700 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,6 +13,7 @@ "args": [ "--extensionDevelopmentPath=${workspaceFolder}", ], + "sourceMaps": true, "outFiles": ["${workspaceFolder}/dist/**/*.js"], "preLaunchTask": "compile", "env": { diff --git a/.vscode/tasks.json b/.vscode/tasks.json index f71286c..5804f54 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -26,7 +26,7 @@ }, "group": { "kind": "build", - "isDefault": true + "isDefault": false } }, {