#How to view stack trace with line numbers of function

1 messages · Page 1 of 1 (latest)

peak finch
#

Hi all, I'm new to Trigger and love the product. When there is an error in 1 of my tasks, I see that there is a stack trace, but the line numbers don't match up to the line numbers in my source code. Is there any way to see on which line the error occured? Thank you for your help.

cunning condorBOT
#

Hi @peak finch. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Short answer: not directly with your original source line numbers.

What you see in the run log is produced from the built bundle that Trigger.dev executes, so stack traces reference bundled files/lines rather than your raw source. To improve debugging:

  • Use dev mode and attach a debugger/breakpoints in VS Code so you can inspect the exact source locations locally (use the provided launch config) (Debugging in VS Code).
  • Add structured logs and traces around the code that’s failing to pinpoint where it blows up (Logging and tracing).
  • If the issue appears only in deploys, use deploy dry-runs and debug logs to reproduce and inspect what the built code looks like (Deployment troubleshooting).

If you need external error monitoring with source maps, follow the Sentry example. It shows how to integrate Sentry and upload source maps via a build extension so stack traces map back to your original code in Sentry’s UI (Track errors with Sentry).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@peak finch Kapa.ai is still learning and improving, please let me know how I did by reacting below.