Skip to content

Instantly share code, notes, and snippets.

@jasonekratz
Last active Sep 30, 2022
Embed
What would you like to do?
Debugging Fastify Applications with Panic's Nova on Mac and Fastify CLI

Debugging Fastify Applications with Panic's Nova on Mac and Fastify CLI

The documentation for Panic's Nova 9 for debugging Node (or in general) is atrocious so I'll share how I was able to debug a local node/Fastify application using Fastify CLI. It's actually pretty simple.

Note: This obviously requires having installed Fastify CLI. In my screenshot I am using a copy of Fastify CLI that is local to my application folder, not a global install. If you're using a global Fastify CLI install the path is likely different to the cli.js. For instance with Homebrew on the Mac the path would be likely be /opt/homebrew/lib/node_modules/fastify-cli/cli.js.

Note: The folder to your "app.js" might be different. I'm writing my app in TypeScript so it's being compiled to JavaScript in the dist folder.

Here is a screenshot of my setup:

Nova 9 NodeJS debug settings

There are more options that can be passed in to Fastify CLI but it should be a simple matter of adding them to the args list. Note too that you can't edit those once they're in or move them around.

After that it's a simple matter of running the task to start up the app and attach the debugger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment