Anyone know how to debug…

less than 1 minute read

Anyone know how to debug tests in vscode in a nx react workspace?

Responses:

I know how to do it with angular ala https://blog.nrwl.io/debugging-nx-in-vs-code-cb1dbe9eeeba

It should be similar to that, but change the program to point to the nx bin

```Debugger listening on <ws://127.0.0.1:14363/56d35c41-6366-49d1-bce9-9561d8db7eb4> For help, see: https://nodejs.org/en/docs/inspector Debugger attached.

> nx run experience-360:test –runInBand=true –codeCoverage=false Starting inspector on 127.0.0.1:14363 failed: address already in use Waiting for the debugger to disconnect… Killed```

Looks like maybe a process hung, and it’s taking up the port

well, running multiple times uses diff port numbers and same result

also happens very very quickly

Hmm maybe try opening a debug terminal in vscode (with ctrl/cmd + shift + p). Set your breakpoints then run the test command in the terminal

That’s what I do

Updated: