Error when debugging of flutter in VSCode - flutter

Connecting to VM Service at ws://127.0.0.1:52373/PSOLWnX5IdE=/ws" error is come in debugging of flutter code in VScode, please tell me how to fix it

Close your current project and run any different and see if it runs. In my case I was getting the same error, so I open a new project and guess what it ran successfully. So I removed my project that was not working and cloned it again. There was no error this time.

Related

How To Fix VSCode: Exception has occurred: ReferenceError: closeDescriptionPopup is not defined

Not sure how this problem specifically occurred. I've been doing some googling trying to narrow down what exactly is going wrong as my project was fine a few days ago. When i attempt to debug my VSCODE project i'm presented with this error.
this is a picture of my launch.json file:
Also, this an error if it helps displayed in the debug console.
Things i've tried so far,
Rebooting the computer
Uninstalling and Reinstalling VSCODE as well as disabling extensions
Creating a new VSCODE Project to attempt to debug
Deleting the launch.json file and creating a new one
just delete the launch.json file and it will work again
After spending some time debugging I solved this problem by simply installing npm packages, I executed command npm i
Just make sure that your npm packages are all installed and none is failing.
Hopefully this helps you or someone with the same issue.
I've solve this problem.
Remove the launch.json file and do not replace it.
Just try to build with F5 button.
Start Debugging from within VSCode
run npm start from a separate terminal and wait for the server to start
refresh the page in your browser
My intuition is that this would create 2 instances of the server binding to the same port and cause a bunch of problems. I'm not sure why, but in my case it worked as expected and let me debug with breakpoints normally.
You don’t need to use the VS Code run button with Live Server. You just right-click the HTML file in explorer and use the menu option “Open with Live Server”.

flutter error Could not find an option named "platforms"

I'm new to learning flutter when I try to crate a new project on android studio gives me a arror message in the event section enter image description here
The MESSAGE: [Could not find an option named "platforms". Run 'flutter -h' (or 'flutter -h') for available flutter commands and options.]
And another problem is flutter doctor does not see the android studio enter image description here
1(By the way, I want to use this version of flutter, please do not give a suggestion like update.)
2(this problem did not exist before, it happened after turning my computer off and on)
And sorry for my english mistakes
Thank you.
flutter version flutter_windows_v1.12.13+hotfix.9-stable
andorid studio version: 4.1.3
Is this the answer to your question about andorid studio?
and you need to install JDK
You are using the wrong flutter SDK. Too low information in your question. Make sure that you have the right path to flutter SDK in your IDE. Check that the flutter SDK directory has the appropriate structure, all needed files and cetera. Channel and version of flutter also may have an influence on this problem.
Got this today out of nowhere. Things were going well, but suddenly when I tried to relaunch the app from fresh, for the error Could not find an option named "target"
UPDATE:
This appears to happen when I switch branches and merge while app is running/flutter is attached. If you're using VS Code,
open your launch.json
change something, I decided to change type: "dart" to type: "notdart"
save
try to debug which fails
then revert that change.
This should fix the issue.
Previous Answer/If you're not using VS Code
What worked for me was to
flutter clean
close the editor (VS Code for me)
close the emulator
give a minute for things to close down
open task manager and kill any left over processes of dart.exe flutter.exe and java.exe and adb.exe (was doing Android)
start VS Code/Android Studio and try to debug again. (when prompted I chose to cold boot the emulator as well)
This takes a while as the emulator has to cold boot and since flutter clean was run, the compilation hadto start from scratch as well.

Command 'Flutter: New Project' resulted in an error (command 'flutter.createProject' not found) and i cant debug flutter project on VSCODE

I have a question. I am using vscode and yesterday VScode is broken and deleted and re-installed But when I debug my project in vscode, there is no response and the computer does not show any error. I couldn't understand where there was an error.I would be very happy if you could help. I cannot progress in the
project, please help.enter image description here
I had the same problem and solved it by doing:
Uninstall VS Code dart and flutter extensions and close VS Code.
After this go to: vscode\extensions and remove all the files.
Run VS Code As Administrator.
Open VS Code and install dart and flutter extensions.
The cause for me might be that when you uninstall an extension files aren't erased.
I hope I helped you
Install 'Recommended' to the current extensions (shown at the bottom right when you launch VS ). This resolved mine.

Refreshing or creating app services button gives error

I used to deploy my service from Visual Studio Code, and now suddenly I'm getting errors saying command 'appService.Refresh' not found, command 'appService.CreateWebApp' not found, etc.
(Click image to enlarge)
Update VSC to the latest version and then restart.

Have not been able to launch Visual Studio Code Insider

I've tried to update the VS Code Insider recently. I don't recall whether the update was complete or not. Ever since then, every time I try to launch VS Code Insider, I get the error "A JavaScript error occurred in the main process." I've kept the screenshot below.
How can this be resolved?
Likely fixable by a reinstall or fixed by the next insiders build
Please file these sort of issues against VSCode directly in the future: https://github.com/Microsoft/vscode/issues/new