Debugging Hooks in Payload 3 - Breakpoints Not Working in VSCode - Documentation needed. #8281
Unanswered
javierlinked
asked this question in
Q&A
Replies: 2 comments
-
I'm unable to debug at all under windows :( debugger won't even start, it just throws an error Exception has occurred: Error: ENOENT: no such file or directory, stat 'G:\projects[..project_dir..]\next.COM |
Beta Was this translation helpful? Give feedback.
0 replies
-
I am also experiencing this on Payload 3.0. I've tried to add the '--inspect' option, but to no avail. breakpoints never break. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
We're in the process of migrating a large codebase from Payload 2 to Payload 3, which includes custom logic in hooks and endpoints. A key part of our development workflow involves using the debugger, and we need to maintain that functionality.
I've followed this guide from Next.js and referred to the Payload 3.0 demo’s launch.json, but I haven't had much success.
The issue is that VSCode never hits breakpoints in our
hooks
(located in ./src/hooks). Occasionally, it stops at a webpack version of the hook on the first run, but never on the actual source file. Ideally, I'd like to attach to the process/port as we used to with nodemon/ts-node.Any guidance on how to resolve this would be greatly appreciated!
We are using a blank template with latest beta packages and mongodb adapter.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions