mirror of
https://github.com/n8n-io/n8n
synced 2026-04-21 15:47:20 +00:00
118 lines
3.5 KiB
JSON
118 lines
3.5 KiB
JSON
{
|
|
// 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": "node",
|
|
"request": "launch",
|
|
"name": "Jest: current file",
|
|
"program": "${workspaceFolder}/node_modules/.bin/jest",
|
|
"args": ["${fileBasenameNoExtension}"],
|
|
"console": "integratedTerminal",
|
|
"windows": {
|
|
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
|
|
}
|
|
},
|
|
{
|
|
"name": "Attach to running n8n",
|
|
"processId": "${command:PickProcess}",
|
|
"request": "attach",
|
|
"skipFiles": ["<node_internals>/**"],
|
|
"type": "node"
|
|
},
|
|
{
|
|
"name": "Launch n8n with debug",
|
|
"program": "${workspaceFolder}/packages/cli/bin/n8n",
|
|
"cwd": "${workspaceFolder}/packages/cli/bin",
|
|
"request": "launch",
|
|
"skipFiles": ["<node_internals>/**"],
|
|
"type": "node",
|
|
"outputCapture": "std",
|
|
"killBehavior": "forceful"
|
|
},
|
|
{
|
|
"name": "Launch n8n CLI worker dev with debug",
|
|
"runtimeExecutable": "pnpm",
|
|
"cwd": "${workspaceFolder}/packages/cli",
|
|
"runtimeArgs": ["run", "dev:worker", "--", "--inspect-brk"],
|
|
"console": "integratedTerminal",
|
|
"restart": true,
|
|
"autoAttachChildProcesses": true,
|
|
"request": "launch",
|
|
"skipFiles": ["<node_internals>/**"],
|
|
"type": "node",
|
|
"envFile": "${workspaceFolder}/.env",
|
|
"outputCapture": "std",
|
|
"killBehavior": "polite"
|
|
},
|
|
{
|
|
"name": "Launch n8n CLI dev with debug",
|
|
"runtimeExecutable": "pnpm",
|
|
"cwd": "${workspaceFolder}/packages/cli",
|
|
"runtimeArgs": ["run", "buildAndDev", "--", "--inspect-brk"],
|
|
"console": "integratedTerminal",
|
|
"restart": true,
|
|
"autoAttachChildProcesses": true,
|
|
"request": "launch",
|
|
"skipFiles": ["<node_internals>/**"],
|
|
"type": "node",
|
|
"envFile": "${workspaceFolder}/.env",
|
|
"outputCapture": "std",
|
|
"killBehavior": "polite"
|
|
},
|
|
{
|
|
"name": "Debug CLI tests",
|
|
"cwd": "${workspaceFolder}/packages/cli",
|
|
"runtimeExecutable": "npm",
|
|
"args": [
|
|
"run",
|
|
"test"
|
|
// "--",
|
|
// "ActiveExecutions"
|
|
],
|
|
"type": "node",
|
|
"request": "launch"
|
|
},
|
|
{
|
|
"name": "Attach to remote n8n (K8s)",
|
|
"type": "node",
|
|
"request": "attach",
|
|
"port": 9229,
|
|
"address": "localhost",
|
|
"localRoot": "${workspaceFolder}/packages/cli",
|
|
"remoteRoot": "/usr/local/lib/node_modules/n8n",
|
|
"skipFiles": ["<node_internals>/**"],
|
|
"restart": true,
|
|
"sourceMaps": true,
|
|
"resolveSourceMapLocations": [
|
|
"${workspaceFolder}/**",
|
|
"!**/node_modules/**"
|
|
],
|
|
"outFiles": [
|
|
"${workspaceFolder}/**/dist/**/*.js"
|
|
],
|
|
"sourceMapPathOverrides": {
|
|
"/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+*@*/node_modules/@n8n/*": "${workspaceFolder}/packages/@n8n/*/dist",
|
|
"/usr/local/lib/node_modules/n8n/packages/*": "${workspaceFolder}/packages/*",
|
|
"/usr/local/lib/node_modules/n8n/*": "${workspaceFolder}/packages/cli/*"
|
|
}
|
|
}
|
|
]
|
|
|
|
/**
|
|
How this works:
|
|
|
|
This file gives VS Code the ability to start and debug n8n.
|
|
The editor is not debuggable from here.
|
|
|
|
The "Run and Debug" tab of your editor should display the "Launch n8n with debug" option.
|
|
This should start n8n and open a debug console. You can add breakpoints to
|
|
Parts of the code residing inside `cli`, `core`, `workflow` and `nodes-base` packages
|
|
|
|
You can also choose to "Attach to running n8n". This is useful if you
|
|
have n8n running in another terminal window and want to debug it.
|
|
Once you click to Debug, VS Code will prompt you to select a process to attach to.
|
|
*/
|
|
}
|