I use a Mac with Visual Studio Code and this is what worked:
Shutdown your PC and switch it on again. Don’t use the restart function. I restarted 2 times and it didn’t work. Only shutdown worked.
PS: I tried out the following:
- Delete lockfile;
killall -9 dart;
- Restart my PC.