Skip to content

Commit 74f6ebd

Browse files
committed
Adds debugging in vs code to Troubleshooting
1 parent 3e6e528 commit 74f6ebd

File tree

4 files changed

+33
-21
lines changed

4 files changed

+33
-21
lines changed

docs/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
"group": "Troubleshooting",
184184
"pages": [
185185
"troubleshooting",
186+
"troubleshooting-debugging-in-vscode",
186187
"upgrading-packages",
187188
"upgrading-beta",
188189
"troubleshooting-alerts",

docs/snippets/debugging_in_vscode.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Debugging your task code in `dev` is supported via VS Code, without having to pass in any additional flags. Create a launch configuration in `.vscode/launch.json`:
2+
3+
```json launch.json
4+
{
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Trigger.dev: Dev",
9+
"type": "node",
10+
"request": "launch",
11+
"cwd": "${workspaceFolder}",
12+
"runtimeExecutable": "npx",
13+
"runtimeArgs": ["trigger.dev@latest", "dev"],
14+
"skipFiles": ["<node_internals>/**"],
15+
"sourceMaps": true
16+
}
17+
]
18+
}
19+
```
20+
21+
Then you can start debugging your tasks code by selecting the `Trigger.dev: Dev` configuration in the debug panel, and set breakpoints in your tasks code.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "Debugging in VS Code"
3+
sidebarTitle: "Debugging in VS Code"
4+
---
5+
6+
import DebuggingInVSCode from '/snippets/debugging_in_vscode.mdx';
7+
8+
<DebuggingInVSCode />

docs/upgrading-beta.mdx

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebarTitle: "Beta upgrade"
44
description: "How to update to 3.0.0 from the beta"
55
---
66

7+
import DebuggingInVSCode from '/snippets/debugging_in_vscode.mdx';
8+
79
The Trigger.dev packages are now at version `3.0.x` in the `latest` tag. This is our first official release of v3 under the latest tag, and we recommend anyone still using packages in the `beta` tag to upgrade to the latest version. This guide will help you upgrade your project to the latest version of Trigger.dev.
810

911
The major changes in this release are a new build system, which is more flexible and powerful than the previous build system. We've also made some changes to the `trigger.dev` CLI to improve the developer experience.
@@ -374,27 +376,7 @@ The `.env` file works slightly differently in `dev` vs `deploy`:
374376

375377
### dev debugging in VS Code
376378

377-
Debugging your tasks code in `dev` is now supported via VS Code, without having to pass in any additional flags. Create a launch configuration in `.vscode/launch.json`:
378-
379-
```json launch.json
380-
{
381-
"version": "0.2.0",
382-
"configurations": [
383-
{
384-
"name": "Trigger.dev: Dev",
385-
"type": "node",
386-
"request": "launch",
387-
"cwd": "${workspaceFolder}",
388-
"runtimeExecutable": "npx",
389-
"runtimeArgs": ["trigger.dev@latest", "dev"],
390-
"skipFiles": ["<node_internals>/**"],
391-
"sourceMaps": true
392-
}
393-
]
394-
}
395-
```
396-
397-
Then you can start debugging your tasks code by selecting the `Trigger.dev: Dev` configuration in the debug panel, and set breakpoints in your tasks code.
379+
<DebuggingInVSCode />
398380

399381
### TRIGGER_ACCESS_TOKEN in dev
400382

0 commit comments

Comments
 (0)