-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug Nexjs app in monorepo with "NODE_OPTIONS='inspect'" #3948
Comments
I'll have a look next week. It's totally new for me but nice you've shared it. Don't get too frustrated though, perfectly normal sometimes 😀 |
BTW really feel free to make a small pr with the dev:debug script on this repo. I'll merge and try. |
Thanks! I'm trying to take a scientific aproach here 🤓 starting by standalone nextjs with javascript and go up to full monorepo pnpm typescript https://github.com/andresgutgon/nextjs-debugging So far I'm in the most simple case following their docs and I'm not understanding how debugging works in node. I did manage to debug a simple express one file server tho. So much be something related with nextjs and sourcemaps. |
Nice. Have you tried it with a getserversideprops route ? |
With default |
mmm. I saw that you use turbo to run the command, might be that too ? (ie https://github.com/vercel/turbo/blob/main/packages/turbo/install.js#L190) |
Yes, I use turbo in my app but in the playground i use plain nextjs app with |
Let me know when you find out... super interested as well. And thanks for your work |
Ok I think I found the right issue I'm having The fix is in this PR which is still pending I wanted to try so I forked NextJS repo and copied these changes and looks it working |
Thanks for the tip. |
What?
Hi, nice to meet you. I've been looking for a solution for this hours and I don't find anything. So first of all sorry for creating an issue in this repo 🙏. But I think this can be really helpful for a lot of people. Debugging Node is not always easy
The problem. Debug node server NextJS app
I'm following their oficial docs: https://nextjs.org/docs/pages/building-your-application/configuring/debugging#server-side-code
But these docs are for a flat next app not for an app living in a monorepo like this so maybe someone already did this.
In my case this is my setup
pnpm
turbo
nextjs 13.x.x
I'm trying this
And i have a nextjs app called
apps/web/package.json
I see the debugger session:
And going to the app on
http://localhost:3000
I see Node debugger sessionBut if I open it any file of my app is there. Only react
I'm out of idea 😓
The text was updated successfully, but these errors were encountered: