Anyone know how to debug…

less than 1 minute read

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


I know how to do it with angular ala

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

```Debugger listening on <ws://> For help, see: Debugger attached.

> nx run experience-360:test –runInBand=true –codeCoverage=false Starting inspector on 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