Skip to content

Commit 7498c12

Browse files
committed
add vscode debugging
1 parent 6e195c2 commit 7498c12

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

.vscode/launch.json

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

.vscode/tasks.json

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

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.debug.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.debug.json

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

0 commit comments

Comments
 (0)