Skip to content

Commit

Permalink
Add .vscode launch examples and settings
Browse files Browse the repository at this point in the history
The launch.json.example can be copied to launch.json to provide a few
debugger-ready launch configurations for the server, tasks, unit tests
and browsers.
  • Loading branch information
tahini committed Nov 7, 2022
1 parent 23550d6 commit 3adfbae
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 2 deletions.
77 changes: 77 additions & 0 deletions .vscode/launch.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "firefox",
"request": "launch",
"name": "Start client in firefox",
// "firefoxExecutable": "usr/bin/firefox-bin",
"reAttach": true,
"webRoot": "${workspaceRoot}",
"url": "http://localhost:8080",
"pathMappings": [
{
"url": "webpack:///src",
"path": "${workspaceFolder}/transition-app/frontend/src"
}
]
},
{
"type": "chrome",
"request": "launch",
"name": "Start client in Chrome",
"port": 9222,
// "runtimeExecutable": "/usr/bin/chromium-browser",
"webRoot": "${workspaceRoot}",
"url": "http://localhost:8080"
},
{
"type": "node",
"request": "launch",
"name": "Run server with yarn",
"skipFiles": [
"<node_internals>/**"
],
"runtimeExecutable": "yarn",
"runtimeArgs": [
"start"
],
"cwd": "${workspaceRoot}"
},
{
"type": "node",
"request": "launch",
"name": "Debug a specific task",
"skipFiles": [
"<node_internals>/**"
],
"runtimeExecutable": "yarn",
"runtimeArgs": [
"babel-node",
"--max-old-space-size=4096",
"packages/transition-backend/lib/scripts/cache/recreateCache.task.js"
],
"cwd": "${workspaceRoot}"
},
{
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--config",
"jest.config.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
},
"cwd": "${workspaceRoot}/packages/chaire-lib-common"
}
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.detectIndentation": false
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
"test:ui": "yarn workspaces run test:ui",
"lint": "yarn workspaces run lint",
"format": "yarn workspaces run format",
"list-tasks": "yarn workspace transition-legacy run list-tasks",
"table-schema": "yarn workspace transition-legacy run table-schema",
"list-tasks": "yarn workspace transition-backend run list-tasks",
"generate-migration": "knex migrate:make"
},
"dependencies": {},
Expand Down

0 comments on commit 3adfbae

Please sign in to comment.