-
Notifications
You must be signed in to change notification settings - Fork 980
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add vscode web debugger and compound (#9567)
Adds 2 debug configurations to vscode/launch.json - Web Debugger (launches the built-in chrome web debugger) - Compound of Dev + Api + Web (launches a fully debuggable redwood with a single configuration) It makes sense to disable the browser open in the redwood.toml if you want to use the web debugger alone or in compound. ``` [browser] open = false ``` It'd also be possible to add a --fwd="--open=false" but that is currently being discussed as an issue in #9209 --------- Co-authored-by: Tobbe Lundberg <tobbe@tlundberg.com>
- Loading branch information
1 parent
e9f5f01
commit cc33ebc
Showing
8 changed files
with
194 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "WaitForDevServer", | ||
"group": "none", | ||
"type": "shell", | ||
"windows": { | ||
"command": "powershell", | ||
"args": [ | ||
"-NoProfile", | ||
"-ExecutionPolicy", "Bypass", | ||
"$port = $env:PORT; while (-not (Test-NetConnection -ComputerName localhost -Port $port)) { Start-Sleep -Seconds 1 };" | ||
] | ||
}, | ||
"linux": { | ||
"command": "bash", | ||
"args": [ | ||
"-c", | ||
"port=$PORT; while ! nc -z localhost $port; do sleep 1; done;" | ||
] | ||
}, | ||
"osx": { | ||
"command": "bash", | ||
"args": [ | ||
"-c", | ||
"port=$PORT; while ! nc -z localhost $port; do sleep 1; done;" | ||
] | ||
}, | ||
"options": { | ||
"env": { | ||
"port": "18911" | ||
} | ||
}, | ||
"presentation": { | ||
"reveal": "silent", | ||
"revealProblems": "onProblem", | ||
"panel": "shared", | ||
"close": true | ||
} | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/create-redwood-app/templates/js/.vscode/tasks.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "WaitForDevServer", | ||
"group": "none", | ||
"type": "shell", | ||
"command": "bash", | ||
"args": [ | ||
"-c", | ||
"while ! echo -n > /dev/tcp/localhost/18911; do sleep 1; done;" | ||
], | ||
"windows": { | ||
"command": "powershell", | ||
"args": [ | ||
"-NoProfile", | ||
"-ExecutionPolicy", "Bypass", | ||
"while (-not (Test-NetConnection -ComputerName localhost -Port 18911)) { Start-Sleep -Seconds 1 };" | ||
] | ||
}, | ||
"presentation": { | ||
"reveal": "silent", | ||
"revealProblems": "onProblem", | ||
"panel": "shared", | ||
"close": true | ||
} | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/create-redwood-app/templates/ts/.vscode/tasks.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "WaitForDevServer", | ||
"group": "none", | ||
"type": "shell", | ||
"command": "bash", | ||
"args": [ | ||
"-c", | ||
"while ! echo -n > /dev/tcp/localhost/18911; do sleep 1; done;" | ||
], | ||
"windows": { | ||
"command": "powershell", | ||
"args": [ | ||
"-NoProfile", | ||
"-ExecutionPolicy", "Bypass", | ||
"while (-not (Test-NetConnection -ComputerName localhost -Port 18911)) { Start-Sleep -Seconds 1 };" | ||
] | ||
}, | ||
"presentation": { | ||
"reveal": "silent", | ||
"revealProblems": "onProblem", | ||
"panel": "shared", | ||
"close": true | ||
} | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters