-
-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/vs code launch tasks #1802
base: develop
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThis pull request introduces several Visual Studio Code configuration files ( Changes
Suggested Reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (2)
desktop/angular/.vscode/tasks.json (1)
40-66
: Consider adding error handling for the killnode task.The
killnode
task is well-structured for cross-platform support, but it might fail silently if no Node.js processes are running.Consider adding error handling by modifying the commands:
"windows": { - "command": "taskkill /F /IM node.exe" + "command": "taskkill /F /IM node.exe || exit 0" }, "osx":{ - "command": "killall node" + "command": "killall node || true" }, "linux":{ - "command": "killall node" + "command": "killall node || true" },🧰 Tools
🪛 Biome (1.9.4)
[error] 48-48: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 51-51: Expected a property but instead found '}'.
Expected a property here.
(parse)
desktop/angular/.vscode/launch.json (1)
15-21
: Fix indentation in sourceMapPathOverrides.The indentation in the
sourceMapPathOverrides
object is inconsistent with the rest of the file.Apply this diff to fix the indentation:
"sourceMapPathOverrides": { - "webpack:/*": "${webRoot}/*", - "/./*": "${webRoot}/*", - "/src/*": "${webRoot}/*", - "/*": "*", - "/./~/*": "${webRoot}/node_modules/*" + "webpack:/*": "${webRoot}/*", + "/./*": "${webRoot}/*", + "/src/*": "${webRoot}/*", + "/*": "*", + "/./~/*": "${webRoot}/node_modules/*" }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.vscode/launch.json
(1 hunks)desktop/angular/.vscode/launch.json
(1 hunks)desktop/angular/.vscode/tasks.json
(1 hunks)desktop/angular/docker-run.bat
(1 hunks)desktop/tauri/.vscode/launch.json
(1 hunks)desktop/tauri/.vscode/tasks.json
(1 hunks)
✅ Files skipped from review due to trivial changes (3)
- desktop/angular/docker-run.bat
- desktop/tauri/.vscode/tasks.json
- .vscode/launch.json
🧰 Additional context used
🪛 Biome (1.9.4)
desktop/angular/.vscode/tasks.json
[error] 39-39: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 48-48: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 51-51: Expected a property but instead found '}'.
Expected a property here.
(parse)
desktop/angular/.vscode/launch.json
[error] 23-23: Expected an array, an object, or a literal but instead found ']'.
Expected an array, an object, or a literal here.
(parse)
desktop/tauri/.vscode/launch.json
[error] 22-22: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 30-30: Expected a property but instead found '}'.
Expected a property here.
(parse)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Build
- GitHub Check: Build
🔇 Additional comments (4)
desktop/angular/.vscode/tasks.json (1)
4-39
: LGTM: Well-configured TypeScript build task.The
debugproj
task is well-configured with:
- TypeScript problem matcher for compilation monitoring
- Background execution with dedicated panel
- Proper working directory setup
🧰 Tools
🪛 Biome (1.9.4)
[error] 39-39: Expected a property but instead found '}'.
Expected a property here.
(parse)
desktop/angular/.vscode/launch.json (1)
7-22
: LGTM: Well-configured Chrome debugger setup.The launch configuration is well-structured with:
- Integration with tasks defined in tasks.json
- Comprehensive source map path overrides for proper debugging
- Local development URL setup
desktop/tauri/.vscode/launch.json (2)
31-38
: LGTM!The Windows debug configuration is well-structured with all the required properties and correctly uses the Windows-specific debugger.
37-37
: Verify the pre-launch task exists in tasks.json.The Windows debug configuration references a pre-launch task "build:debug". Please ensure this task is properly defined in the
tasks.json
file.Run the following script to verify the task definition:
✅ Verification successful
The pre-launch task "build:debug" exists and is properly configured
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the pre-launch task exists in tasks.json. # Test: Check if tasks.json exists and contains the build:debug task. cat desktop/tauri/.vscode/tasks.json | jq '.tasks[] | select(.label == "build:debug")'Length of output: 145
Script:
#!/bin/bash # First, check if tasks.json exists if [ -f "desktop/tauri/.vscode/tasks.json" ]; then echo "File exists. Contents:" cat desktop/tauri/.vscode/tasks.json else echo "tasks.json does not exist in desktop/tauri/.vscode/" fiLength of output: 502
"options": { | ||
"cwd": "${workspaceFolder}/src" | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix JSON syntax errors: Remove trailing commas.
The JSON file contains trailing commas that need to be removed to ensure valid JSON syntax.
Apply this diff to fix the JSON syntax:
"options": {
"cwd": "${workspaceFolder}/src"
- },
+ }
"osx":{
- "command": "killall node",
+ "command": "killall node"
},
"linux":{
- "command": "killall node",
+ "command": "killall node"
},
Also applies to: 48-48, 51-51
🧰 Tools
🪛 Biome (1.9.4)
[error] 39-39: Expected a property but instead found '}'.
Expected a property here.
(parse)
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug Prod", | ||
"cargo": { | ||
"args": ["build", "--release", "--manifest-path=./src-tauri/Cargo.toml"] | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add missing required properties for LLDB debugging (release mode).
The LLDB debug configuration for release mode is missing several required properties:
program
: Path to the release executableargs
: Arguments to pass to the programcwd
: Working directory for the debugger
Apply this diff to add the missing properties:
{
"type": "lldb",
"request": "launch",
"name": "Debug Prod",
+ "program": "${workspaceRoot}/src-tauri/target/release/app",
+ "args": [],
+ "cwd": "${workspaceRoot}",
"cargo": {
"args": ["build", "--release", "--manifest-path=./src-tauri/Cargo.toml"]
},
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
{ | |
"type": "lldb", | |
"request": "launch", | |
"name": "Debug Prod", | |
"cargo": { | |
"args": ["build", "--release", "--manifest-path=./src-tauri/Cargo.toml"] | |
}, | |
}, | |
{ | |
"type": "lldb", | |
"request": "launch", | |
"name": "Debug Prod", | |
"program": "${workspaceRoot}/src-tauri/target/release/app", | |
"args": [], | |
"cwd": "${workspaceRoot}", | |
"cargo": { | |
"args": ["build", "--release", "--manifest-path=./src-tauri/Cargo.toml"] | |
}, | |
}, |
🧰 Tools
🪛 Biome (1.9.4)
[error] 30-30: Expected a property but instead found '}'.
Expected a property here.
(parse)
{ | ||
"type": "lldb", // `vscode-lldb` extension has to be installed (https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) | ||
"request": "launch", | ||
"name": "Debug Dev", | ||
"cargo": { | ||
"args": [ | ||
"build", | ||
"--manifest-path=./src-tauri/Cargo.toml", | ||
"--no-default-features" | ||
] | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add missing required properties for LLDB debugging.
The LLDB debug configuration is missing several required properties:
program
: Path to the executable to debugargs
: Arguments to pass to the programcwd
: Working directory for the debugger
Apply this diff to add the missing properties:
{
"type": "lldb",
"request": "launch",
"name": "Debug Dev",
+ "program": "${workspaceRoot}/src-tauri/target/debug/app",
+ "args": [],
+ "cwd": "${workspaceRoot}",
"cargo": {
"args": [
"build",
"--manifest-path=./src-tauri/Cargo.toml",
"--no-default-features"
]
},
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
{ | |
"type": "lldb", // `vscode-lldb` extension has to be installed (https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) | |
"request": "launch", | |
"name": "Debug Dev", | |
"cargo": { | |
"args": [ | |
"build", | |
"--manifest-path=./src-tauri/Cargo.toml", | |
"--no-default-features" | |
] | |
}, | |
}, | |
{ | |
"type": "lldb", // `vscode-lldb` extension has to be installed (https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) | |
"request": "launch", | |
"name": "Debug Dev", | |
"program": "${workspaceRoot}/src-tauri/target/debug/app", | |
"args": [], | |
"cwd": "${workspaceRoot}", | |
"cargo": { | |
"args": [ | |
"build", | |
"--manifest-path=./src-tauri/Cargo.toml", | |
"--no-default-features" | |
] | |
}, | |
}, |
🧰 Tools
🪛 Biome (1.9.4)
[error] 22-22: Expected a property but instead found '}'.
Expected a property here.
(parse)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (6)
.vscode/launch.json (6)
12-14
: Inline Comment Placement in "portmaster-core" Configuration
The"args"
property currently ends with an inline comment on line 13, which appears to trigger static analysis errors (e.g., “Expected a property but instead found '}'” on line 14). Since Visual Studio Code’s configuration files support JSON with comments (JSONC), the inline comment may be acceptable in VS Code but not to all linters. Consider moving the comment to a dedicated preceding line. For example:- "args": ["--data=D:\\delme\\pmdata", "--disable-interception=true", "-log=trace"], // TODO: update the path to the data folder if needed + // TODO: update the path to the data folder if needed + "args": ["--data=D:\\delme\\pmdata", "--disable-interception=true", "-log=trace"],This will improve compatibility with strict JSON parsers.
🧰 Tools
🪛 Biome (1.9.4)
[error] 14-14: Expected a property but instead found '}'.
Expected a property here.
(parse)
20-22
: Inline Comment Placement in "portmaster-start" Configuration
Similar to the previous configuration, the"args"
property in the"portmaster-start"
block includes an inline comment (line 21) that may trigger static analysis errors. Moving the comment above the property enhances clarity and avoids potential parsing issues. For example:- "args": ["app", "--data=D:\\delme\\pmdata", "-log=trace"], // TODO: update the path to the data folder if needed + // TODO: update the path to the data folder if needed + "args": ["app", "--data=D:\\delme\\pmdata", "-log=trace"],🧰 Tools
🪛 Biome (1.9.4)
[error] 22-22: Expected a property but instead found '}'.
Expected a property here.
(parse)
28-30
: Refine Inline Comment in "notifier" Configuration
The"notifier"
configuration (lines 24-30) also embeds a TODO comment on the same line as the"args"
property. Moving this comment to its own line will help prevent static analysis warnings:- "args": ["--data=D:\\delme\\pmdata", "-log=trace"], // TODO: update the path to the data folder if needed + // TODO: update the path to the data folder if needed + "args": ["--data=D:\\delme\\pmdata", "-log=trace"],🧰 Tools
🪛 Biome (1.9.4)
[error] 30-30: Expected a property but instead found '}'.
Expected a property here.
(parse)
36-38
: Improve Comment Placement in "observation-hub" Configuration
For the"observation-hub"
entry, the inline comment on the"args"
property (line 37) is similarly placed. To ensure consistency and avoid static analysis errors, consider relocating the comment:- "args": ["--data=D:\\delme\\pmdata", "-log=trace"], // TODO: update the path to the data folder if needed + // TODO: update the path to the data folder if needed + "args": ["--data=D:\\delme\\pmdata", "-log=trace"],🧰 Tools
🪛 Biome (1.9.4)
[error] 38-38: Expected a property but instead found '}'.
Expected a property here.
(parse)
44-46
: Adjust Inline Comment in "hub" Configuration
The"hub"
configuration (lines 40-46) follows the same pattern with an inline comment on the"args"
property (line 45). As with the others, moving the comment out of the line can help avoid parsing issues:- "args": ["--data=D:\\delme\\pmdata_hub", "-log=trace"], // TODO: update the path to the data folder if needed + // TODO: update the path to the data folder if needed + "args": ["--data=D:\\delme\\pmdata_hub", "-log=trace"],🧰 Tools
🪛 Biome (1.9.4)
[error] 46-46: Expected a property but instead found '}'.
Expected a property here.
(parse)
1-48
: Cross-Platform Considerations & Hard-Coded Paths
The configurations currently use absolute Windows paths (e.g.,D:\\delme\\pmdata
andD:\\delme\\pmdata_hub
). If the project is used in a cross-platform context or by collaborators on non-Windows systems, consider replacing these with workspace-relative paths or environment variables. This might further improve the development experience.🧰 Tools
🪛 Biome (1.9.4)
[error] 14-14: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 22-22: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 30-30: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 38-38: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 46-46: Expected a property but instead found '}'.
Expected a property here.
(parse)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.vscode/launch.json
(1 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
.vscode/launch.json
[error] 14-14: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 22-22: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 30-30: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 38-38: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 46-46: Expected a property but instead found '}'.
Expected a property here.
(parse)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Build
- GitHub Check: Build
🔇 Additional comments (1)
.vscode/launch.json (1)
1-6
: Overall File Structure and Configuration Format
The file is well-organized and clearly defines multiple launch configurations for various Go applications. The use of descriptive keys like"name"
,"type"
,"request"
, etc., enhances readability and maintainability.
Visual Studio Code launch configurations
Summary by CodeRabbit