chore(vscode): fix dev-server task matcher and add debuggable-Chrome task

Disable Vite's ANSI output (NO_COLOR/FORCE_COLOR) so the background-task
problem matcher's endsPattern reliably matches, fixing the
'Error exists after running preLaunchTask' failure. Add a
'Launch Debuggable Chrome' task (:9222, persistent ~/.chrome-rw-debug
profile) and an attach compound so you can debug the frontend in a Chrome
you control and stay logged in. Update DEBUGGING.md.
This commit is contained in:
NeilClack
2026-09-29 13:41:18 -05:00
parent e9f94b72ee
commit cc4aa8717e
3 changed files with 55 additions and 11 deletions
+15 -5
View File
@@ -82,10 +82,11 @@
"skipFiles": ["<node_internals>/**"]
},
{
// Attach to a Chrome you started yourself with:
// /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
// --remote-debugging-port=9222 --user-data-dir=/tmp/rw-chrome
// Handy when Chrome is already open with your logged-in session.
// Attach to a Chrome you are already using (with your logged-in
// session). Chrome must have been started with a debugging port.
// Easiest path: run the "Launch Debuggable Chrome" task once, log in,
// navigate to http://localhost:5173, then start this profile.
// It does NOT start the dev server or a browser for you.
"name": "Frontend: Chrome (attach)",
"type": "chrome",
"request": "attach",
@@ -96,7 +97,8 @@
"sourceMapPathOverrides": {
"vite:///src/*": "${webRoot}/src/*",
"/@fs/*": "*"
}
},
"skipFiles": ["<node_internals>/**"]
},
{
// If you specifically want Edge instead of Chrome.
@@ -120,6 +122,14 @@
"configurations": ["Backend: Attach (no server start)", "Frontend: Chrome (no server start)"],
"preLaunchTask": "Start Dev Server (Node Inspector)",
"stopAll": true
},
{
// Start the dev server, then attach to your already-open, logged-in
// Chrome. Run the "Launch Debuggable Chrome" task once beforehand.
"name": "Frontend: Attach to my Chrome (starts server)",
"configurations": ["Frontend: Chrome (attach)"],
"preLaunchTask": "Start Dev Server",
"stopAll": true
}
]
}