Skip to content

Commit

Permalink
Add VS Code debug config (#1882)
Browse files Browse the repository at this point in the history
* add vscode debugging
  • Loading branch information
YaroShkvorets authored Dec 27, 2024
1 parent 9b88bbd commit 75e76fa
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug graph init",
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/packages/cli/bin/run",
"args": ["init", "--skip-git"],
"preLaunchTask": "build:dev",
"outFiles": ["${workspaceFolder}/packages/cli/dist/**/*.js"],
"sourceMaps": true,
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build:dev",
"type": "shell",
"command": "pnpm",
"args": ["--filter=@graphprotocol/graph-cli", "build:dev"],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "silent",
"panel": "shared"
},
"problemMatcher": "$tsc"
}
]
}
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
],
"scripts": {
"build": "tsc -b tsconfig.build.json && oclif manifest && oclif readme && copyfiles -u 1 src/**/*.graphql dist/",
"build:dev": "tsc -b tsconfig.dev.json",
"oclif:pack": "npm pack && pnpm oclif pack tarballs --no-xz",
"test": "vitest run --bail=1",
"test:add": "vitest run tests/cli/add.test.ts",
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/tsconfig.dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"sourceMap": true,
"inlineSources": true
},
"include": ["./src"]
}

0 comments on commit 75e76fa

Please sign in to comment.