Skip to content

Commit 75e76fa

Browse files
Add VS Code debug config (#1882)
* add vscode debugging
1 parent 9b88bbd commit 75e76fa

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Debug graph init",
8+
"skipFiles": ["<node_internals>/**"],
9+
"program": "${workspaceFolder}/packages/cli/bin/run",
10+
"args": ["init", "--skip-git"],
11+
"preLaunchTask": "build:dev",
12+
"outFiles": ["${workspaceFolder}/packages/cli/dist/**/*.js"],
13+
"sourceMaps": true,
14+
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
15+
"console": "integratedTerminal",
16+
"internalConsoleOptions": "neverOpen"
17+
}
18+
]
19+
}

.vscode/tasks.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build:dev",
6+
"type": "shell",
7+
"command": "pnpm",
8+
"args": ["--filter=@graphprotocol/graph-cli", "build:dev"],
9+
"group": {
10+
"kind": "build",
11+
"isDefault": true
12+
},
13+
"presentation": {
14+
"reveal": "silent",
15+
"panel": "shared"
16+
},
17+
"problemMatcher": "$tsc"
18+
}
19+
]
20+
}

packages/cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
],
2323
"scripts": {
2424
"build": "tsc -b tsconfig.build.json && oclif manifest && oclif readme && copyfiles -u 1 src/**/*.graphql dist/",
25+
"build:dev": "tsc -b tsconfig.dev.json",
2526
"oclif:pack": "npm pack && pnpm oclif pack tarballs --no-xz",
2627
"test": "vitest run --bail=1",
2728
"test:add": "vitest run tests/cli/add.test.ts",

packages/cli/tsconfig.dev.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"sourceMap": true,
5+
"inlineSources": true
6+
},
7+
"include": ["./src"]
8+
}

0 commit comments

Comments
 (0)