cloud icon indicating copy to clipboard operation
cloud copied to clipboard

How to debug Nextjs backend in VSCode?

Open romanellius opened this issue 1 year ago • 1 comments

Hi! I've created a Nextjs app and I'm trying to debug the API. I usually use VSCode's auto attach mode to debug Nodejs but can't make it work with the Developer Sandbox. VSCode debugger doesn't attach to Nodejs process because of "wrapping logic" of Cloud CLI, I guess . Looked through the docs and found nothing about the debugging using the Sandbox.

UPD/ the only way I found is to attach by process id, but it's not very convenient 😄.

Thank you!

romanellius avatar Sep 18 '22 23:09 romanellius

Hi @romanellius, as you also found out, the only way that could work is attaching the process id to your local server we created for you. However, we also don't think that it would be convenient.

Lack of debugging capabilities is a known issue for us and the only method I can recommend for now is using the print statements. We hope to work on broader debugging capabilities soon.

emrahssamdan avatar Sep 19 '22 04:09 emrahssamdan