- add server.js to the root path of the project
#!/usr/bin/env node
'use strict';
// Start Strapi
const strapi = require('strapi');
strapi().start();
- set launch.json as the following(root path of strapi project):
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/server.js"
},
]
}
- add a breakpoint to the row you want to debug, click the debug button, done!
see more here