Search code examples
strapi

Attach debugger to Strapi server


How to start Strapi with --inspect=0.0.0.0:9229 parameter or any other way to attach the debugger to my server?

This is how I could manage that with alpha version but server.js has been removed since beta:

package.json -> scripts

 "debug": "cross-env NODE_ENV=development nodemon --inspect=0.0.0.0:9229 server.js"

Solution

  • Never mind,

    node --inspect=0.0.0.0:9229 ./node_modules/.bin/strapi dev
    

    does the trick.