forked from stylescape/unit.gl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
launch.json
73 lines (73 loc) · 3.03 KB
/
launch.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Program",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/index.js", // Entry point of the application
"preLaunchTask": "npm: build", // Task to run before launching
"outFiles": ["${workspaceFolder}/dist/**/*.js"], // Compiled output files for debugging
"env": {
"NODE_ENV": "development"
},
"console": "integratedTerminal", // Use integrated terminal for output
"internalConsoleOptions": "neverOpen",
"args": [], // Arguments passed to the Node.js program
"sourceMaps": true, // Enable source maps for better debugging
"cwd": "${workspaceFolder}", // Set the current working directory
"runtimeExecutable": "node", // Specify the Node.js runtime
"runtimeArgs": [
"--nolazy", // Disable lazy loading for better debugging
"--inspect-brk" // Start debugger and break before the first line
],
"skipFiles": [
"<node_internals>/**" // Skip internal Node.js modules while debugging
]
},
{
"name": "Launch via NPM",
"type": "node",
"request": "launch",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"start" // Replace "start" with your npm script
],
"env": {
"NODE_ENV": "development"
},
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
},
{
"name": "Attach to Process",
"type": "node",
"request": "attach",
"processId": "${command:PickProcess}", // Dynamically pick the process to attach to
"restart": true, // Automatically restart if the Node.js process stops
"protocol": "inspector", // Use the inspector protocol for debugging
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Attach to Remote",
"type": "node",
"request": "attach",
"address": "localhost", // Replace with the remote host if needed
"port": 9229, // Default port for Node.js inspector
"localRoot": "${workspaceFolder}", // Local folder mapped to the remote workspace
"remoteRoot": "/app", // Remote folder in the container or server
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"skipFiles": [
"<node_internals>/**"
]
}
]
}