cyco130 / vavite

Develop server-side applications with Vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to debug mode launch with vavite?

gseok opened this issue · comments

how to debug mode launch with vavite?

vavite with (koa or express).. I want node.js code debug
so, I'm try vavite serve --inspect .. but this is failed..

how to run debug mode (for node server debuging)?

Hi,

The vavite CLI command is a wrapper for the vite CLI command. As such, it doesn't have an --inspect flag. That belongs to Node.js, not Vite.

But you can launch it via Node like this:

node --inspect node_modules/vavite/cli.js serve

Or you can use the NODE_OPTIONS environment variable for a cleaner solution:

NODE_OPTIONS="$NODE_OPTIONS --inspect" vavite serve