VS Code debugging

Hi,

I was wondering if it’s possible to debug Edge functions in VS Code like it is with standard Lambda functions?

I can’t get seem to get the debugger to hit. The CLI did tell me it was going to make a change to my VS Code config but then nothing seemed to change. Is this a known issue? Is this my side?

Thanks,

Jamie

Hey there, @jsaunders92 :wave:

Thanks so much for reaching out about this. We have filed an issue with the team working on this, and will follow up here once we have more insights for you.

Hey @hillary,

Thank you! I look forward to hearing some more soon :slight_smile:

Hey @jsaunders92,

The team has prioritized this as we see how this could be helpful to the users. We’d probably be creating some documentation or guides about it. We haven’t ironed out the specifics yet, and thus, it will take some time, and we’d post an update once we’ve got there.

Unfortunately, we don’t have anything immediate to share at the moment.

Hey all,

This is now available in netlify-cli v10.4.0.

CLI docs link: cli/dev.md at main · netlify/cli · GitHub

Flags:
edgeInspect - enable the V8 Inspector Protocol for Edge Functions, with an optional address in the host:port format
edgeInspectBrk - enable the V8 Inspector Protocol for Edge Functions and pause execution on the first line of code, with an optional address in the host:port format

Usage:

netlify dev --edgeInspect
netlify dev --edgeInspect=127.0.0.1:9229
netlify dev --edgeInspectBrk
netlify dev --edgeInspectBrk=127.0.0.1:9229

Hi,

Thank you!! Can’t wait to give this a go.