I created a React Native project using the popular Ignite CLI v2.0.0
with the default boilerplate.
Then I adorned it with a bunch of nodejs shims, because I\'ll
Finally found the solution. It seems there are still a number of issues with the new inspector protocol in Node 8.*
. In short the support for --inspect
is still quite experimental.
For example the NodeJS Inspector Manager (NiM 0.13.8
) was crashing and disconnecting websocket after few second (See: NiM Github issue #17 and Chromium bug #734615).
So I downgraded NodeJS 8.1.2
--> 7.10.1
Now finally things work as expected. I can do all debugging in VS code, hit all the breakpoints, with the following debug configuration:
{
"type": "node",
"request": "launch",
"name": "Launch Tests",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"args": [
"--runInBand",
"--no-cache"
],
"runtimeArgs": [
"--debug-brk=127.0.0.1:5858"
],
"port": 5858
}
Wasted more than a day on something that should be a 5 min. no-brainer. But luckily its working now!