Question
- What do I have to do to make WebStorm hit the breakpoint?
- Is it necessary to set the %NODE_DEBUG_OPTION%? If yes, how do I do this in combination with vue-cli.service?
Steps to reproduce:
- vue create myapp
- Set options to:
- ? Please pick a preset: Manually select features
- ? Check the features needed for your project: Babel, Unit
- ? Pick a unit testing solution: Jest
- ? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In package.json
- ? Save this as a preset for future projects? No
- Set options to:
- Open myapp in WebStorm
- Open npm Tool Windows
- Set breakpoint in tests/unit/example.spec.js
- Rightclick on test:unit->Debug test:unit
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" }[email protected] test:unit C:\Users\c-jay\myapp vue-cli-service test:unit
PASS tests/unit/example.spec.js
Configuration:
- WebStorm 2018.2.4
- Vue CLI v3.0.5