Reputation: 61
Environment is win 10. Code lines, which i try to debug:
let x='xxx';
console.log(x);
Upvotes: 2
Views: 2298
Reputation: 131
I've ran into this error a few times in VSCode while working on some NodeJS apps and it is an easy fix.
net stop winnat
net start winnat
You don't even have to restart VSCode, just restart your debugger and you should be good. I don't know why Windows 10 NAT gets all buggy but this will give it a kick.
Upvotes: 11
Reputation: 2088
First thing to do is to check if the port is already in use.
netsh interface ipv4 show excludedportrange protocol=tcp
Maybe try running the server on a different port or rebooting Windows to see if it frees up the port if nothing else is using it.
Upvotes: 2