`console.log` not showing in terminal when running `netlify.dev`


I’m testing my edge functions locally and I’ve put in a few console.log statements to check the value of certain variables at specific points.

I recall console.log statements used to show up in my VS Code’s terminal window after running netlify.dev but nothing is showing up anymore (I’m currently on version 17.15.1).

Even when the I place the console.log statement right at the top of the edge function and I hit the route directly (in other words, it’s definitely being run), no logging output is shown in my integrated terminal in VS Code.

How can I console.log variables locally so I can check the value of things running in my edge functions?

Thank you very much for your time!

PS. After I couldn’t figure out how to get console.log output to appear in my terminal, I tried to set up debugging - but I also failed at that and I created a new issue here.

This should still work. Try switching your terminal to a different one (bash/zsh on Mac, Powershell/CMS on Windows)

I switched to bash and it’s loading the edge function fine and the logic of the edge function runs, but console.log statements are still not being output to the console

You might be right. I am not seeing anything either at least in the latest version. It works fine for Functions though, just not Edge Functions.

Indeed, I downgraded to version 17.13.0 and I’m getting console.log statements now.

This should be fixed in 17.15.2

1 Like

After much frustration I found that simply using console.info instead of console.log will get messages showing in the terminal when running netlify dev
I am running the latest version.

thanks for sharing your solution with the community. this is helpful. :+1:t6: