What exactly happened
Hey I went into the same problem too.
I cannot use a Emulator inside windows because my pc is a very low end pc.
So, I had to use my phone instead. It is a Samsung Galaxy J2 Pro (SM-J210F) with Android 6.0.1 (Android Marshmallow).
I used that phone to develop flutter apps regularly, but suddenly, I went to this problem.
Here's what happened when I tried to run "Flutter Attach" in VS-Code(v1.52.0).
command
flutter attach --machine -d 420054e7960eb400
exception
StateError: Bad state: Existing VM service clients prevent DDS from taking control.
#0 DartDevelopmentService.startDartDevelopmentService (package:flutter_tools/src/base/dds.dart:83:11)
<asynchronous suspension>
#1 FlutterDevice.connect.<anonymous closure> (package:flutter_tools/src/resident_runner.dart:249:11)
<asynchronous suspension>
Fixing the issue (In Windows 10)
So, I ran these commands to fix the issue.
Fixing the Flutter SDK
-flutter clean -v
-flutter channel stable ** (Optional if these didn't fix the issue)
-flutter upgrade -v
-flutter pub cache repair -v (Disclaimer: It will download each and every version of all the packages. Be sure to have really fast internet or give at least an hour to this.)
Configure your Proxy/VPN
If you are using a Proxy or VPN to connect to the internet,
Make sure that application isn't resolving localhost via that.(DNS)
Kill ADB and Dart processes.
After that, kill adb and dart process on Windows.
(I don't know exactly how to kill these in Mac/Linux. Sorry About That)
Run these commands in the Command Prompt.
taskkill /f /im dart*
taskkill /f /im adb* (You can run "adb kill-server" too)
Fixing the ADB in the Windows (*Optional).
Navigate to %HOMEDRIVE%:\Users%USERNAME%.android"
In my case, It is ( C:\Users\Isira Adithya.android )
Then delete adbkey.
Fixing the Android Debugging in the Android Device
Disconnect the device from the computer.
Go to Settings -> Developer Options,
Turn off USB Debugging and Turn it on again.
Revoke USB Debugging authorizations.
Restart the device.
Update Windows and Android System (If above didn't solve the problem)
Conclusion
I think these steps should fix your problem.
Also I am still 16 years old and I am not a very experienced developer.
If these didn't fix, use this to get more info. Github Issue