To use Vike's debug logs:

# Inspect the routing
DEBUG=vike:routing npm run dev
# Inspect what `.page.js` files are found and how they are treated
DEBUG=vike:pageFiles npm run dev
# Inspect HTTP Streaming
DEBUG=vike:stream npm run dev
# Inspect errors
DEBUG=vike:error npm run dev
# Inspect logs
DEBUG=vike:log npm run dev
# Combination
DEBUG=vike:log,vike:error,vike:stream npm run dev

These debug logs allow you to understand how Vike thinks of your app. For example, to figure out why your app returns a 404, use vike:routing and vike:pageFiles.

There are more debug logs (vike:glob, vike:extractAssets, ...) but these aren't user-friendly as they are meant for Vike maintainers.

If you want more debug logs, add a comment at #249.


To enable Vite's debug logs, set the environment variable DEBUG to vite:*.

$ DEBUG=vite:* npm run dev

If you have a problem with Vite, we recommend considering injecting a bunch of console.log() inside node_modules/vite/dist/**/*.js in order to inspect what's going on.

It may sound scary to dig into Vite's source code, but it's sometimes quicker to find the root cause of your problem than treating Vite as a black box. Also:

  • It's more interesting. (Vite's source code is well-written and pleasurable to read.)
  • You may end up being able to do a Vite PR solving your problem (while helping the whole community!). (If you open a Vite PR, feel free to reach out to Vike maintainers to get your PR merged quicker.)

Instead of:

$ git clone
$ cd vite/packages/vite/
$ pnpm install
$ pnpm run dev
$ cd ../../../my-app/
$ npm link ../vite/packages/vite/

We recommend to:

  • Browse the source code of $ git clone
  • But, for an increased feedback loop, inject console.log() directly inside my-app/node_modules/vite/dist/**/*.js.