You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node has this great feature for debugging inside a webkit inspector (for example to console log complete objects) using the NODE_OPTIONS env variable.
Unfortunately, there seem to be multiple node processes running during development. My start scripts look like this NODE_OPTIONS='--inspect' next and it works to the level of console logging everything inside my next.config.json to a webkit console.
What I would prefer though, if I could inspect my functions that are run from getStaticProps for example. Unfortunately, this is not possible, because that's a different node process and the same port can't be reused (I also get a warning regarding that inside my console).
It would be nice to have some option to set the NODE_OPTIONS individually, or you could internally possibly pass the console logs along to the other node process?
Nothing of high priority, but it would be neat to have :D
The text was updated successfully, but these errors were encountered:
I feel really stupid now, but after some more investigation I just found out, there is a "fix". You can set "NODE_OPTIONS='--inspect=0' next" (notice the "=0") and it will assign random ports. This is a bit annoying as you need to add the new ports manually after every start again, but its the best workaround I currently know ^^
EDIT: I was able to connect to the second node process, but it doesn't seem to be the one from server-side methods like getStaticProps, I don't know if it's possible for that :(
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 30, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Node has this great feature for debugging inside a webkit inspector (for example to console log complete objects) using the NODE_OPTIONS env variable.
Unfortunately, there seem to be multiple node processes running during development. My start scripts look like this
NODE_OPTIONS='--inspect' next
and it works to the level of console logging everything inside my next.config.json to a webkit console.What I would prefer though, if I could inspect my functions that are run from
getStaticProps
for example. Unfortunately, this is not possible, because that's a different node process and the same port can't be reused (I also get a warning regarding that inside my console).It would be nice to have some option to set the NODE_OPTIONS individually, or you could internally possibly pass the console logs along to the other node process?
Nothing of high priority, but it would be neat to have :D
The text was updated successfully, but these errors were encountered: