forked from bloom-housing/bloom
-
Notifications
You must be signed in to change notification settings - Fork 1
Debugging
Austin Valeske edited this page Sep 28, 2021
·
3 revisions
The backend and frontends are setup to be easily debugged with VS Code. You just need to add the right configuration to your launch.json, and start the apps so they're listening for a debugger.
Instructions on debugging the public site are in the public site readme, here.
Instructions on debugging the partners site are in the partners site readme, here.
Instructions on debugging the backend are in the backend readme, here.
A launch.json that will add configurations for all the sites, as well as some tests, as a configurations
field like this:
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Backend Tests with Debugger",
"runtimeExecutable": "yarn",
"cwd": "${workspaceFolder}/backend/core",
"runtimeArgs": ["test:debug"],
"stopOnEntry": true,
"port": 9229
},
{
"type": "node",
"request": "launch",
"name": "Launch Backend e2e Tests with Debugger",
"runtimeExecutable": "yarn",
"cwd": "${workspaceFolder}/backend/core",
"runtimeArgs": ["test:e2e:debug"],
"stopOnEntry": true,
"port": 9229
},
{
"name": "Attach to Public Site",
"port": 9230,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"restart": true,
"sourceMaps": true,
"cwd": "${workspaceFolder}/sites/public"
},
{
"name": "Attach to Partners Site",
"port": 9231,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"restart": true,
"sourceMaps": true,
"cwd": "${workspaceFolder}/sites/partners"
},
{
"name": "Attach to Backend",
"port": 9229,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"restart": true,
"sourceMaps": true,
"cwd": "${workspaceFolder}/backend/core"
},
]