Question
Steps to reproduce:
console output:
To debug the "test:unit" script, make sure the %NODE_DEBUG_OPTION% string is specified as the first argument for the node command you'd like to debug. For example:
"scripts": { "start": "node %NODE_DEBUG_OPTION% server.js" }
myapp@0.1.0 test:unit C:\Users\c-jay\myapp vue-cli-service test:unit
PASS tests/unit/example.spec.js
Configuration:
According to cli-plugin-jest and npm tasks debug in WebStorm I've edited the npm test:unit call in the scripts-section of my package.json to:
"test:unit": "node %NODE_DEBUG_OPTION% node_modules/@vue/cli-service/bin/vue-cli-service.js test:unit"
And webstorm hits the breakpoints as expected. This is for Windows. On Mac should it be:
"test:unit": "node $NODE_DEBUG_OPTION node_modules/@vue/cli-service/bin/vue-cli-service.js test:unit"