Viewing Next.js Server Logs in IDX

Hi,

First, I just wanted to give my thanks to the IDX team. It’s an incredible tool, and it particularly good for getting people contributing to a project right away, which I love.

I have, what I think is a basic questions. I’ve built a Next.js project, based on the IDX Next.js starter. But i’m having a little bit of an issue seeing server logs. For example I create an API route (that works as expected) but my logs in the route I can’t seem to find.

What’s the idiomatic way of seeing these logs in IDX?

Thanks!

1 Like

I think, the best way to see your Next.js server logs in IDX is to use the built-in terminal. When you run your Next.js development server within IDX (which should be happening if you’re able to test your API routes), all the server-side console output, including logs from your API routes, will be streamed to that terminal.

Hey @snipes5 thanks. But i’m not seeing it. The server starts automatically from the nix out of the box setup. But I don’t see a terminal with logs. I have some console.log statements in my api route and their output is nowhere to be seen.

Go to the output tab. and select IDX from the dropdown menu.

image

2 Likes

This is exactly what I was after! Thank you so much @notsarv !

2 Likes