Get Dart Devtools to open in Chrome - flutter

Currently, Dart Devtools opens as a tab in VSCode. I want it to go back to opening in Chrome as it did in previous versions of Flutter.

Update VSCode to the newest Version.
VSCode Update
Update Flutter
flutter Update
Now run your Project and then click [ctrl] + [alt] + [d] for running dart devtools. VSCode is asking you where you wish to open DevTools.

Do not bother about it mate, just add this line on settings.json
"dart.embedDevTools": false
Then you will get again DevTools on Chrome. Just shortcode: Ctrl + Alt + D.
That's it.

In your terminal, run:
dart devtools
It will open Flutter Devtools page in your default browser. When you start an application is should print an id starting and ending with ws. This id will be used to connect devtools to the app

"dart.embedDevTools": false
is not relevant anymore, instead you should use:
"dart.devToolsLocation": "external"

Related

On start debugging a new browser window pops up in flutter using vscode

I'm trying to hot reload my flutter app that runs on a browser but whenever i run ctrl + f5 or f5 a new blank browser window appears.
Can someone help please
may be you can try flutter run -d chrome to Run Chrome using the default renderer option

What is the problem while saving flutter code

Good evening everyone I have a problem if I modify the code on android studio the changes do not appear on my emulator unless I restart android studio
You need to "deliver" your code to a device. From Android Studio, you can click on Flutter Hot Reload (Flash icon on screenshot), or do this action by shortcut (depends on OS on your computer, put mouse cursor to Flutter Hot Reload icon and IDE give hint about hot key for this action): Ctrl + Shift + \ on Windows or Shift + \ on macOS.

How to use Flutter's Widget Inspector in Visual Studio Code?

How do you use the Flutter Widget Inspector introduced in VSCode and now enabled? When I debug the app from the IDE or Terminal, nothing happens when I click on any widget in the iOS simulator. I could not find any info on VSCode from Google.
I am on MacOS Sierra.
As of v2.24, the Dart extension for VS Code has integration with the Dart DevTools. This has much better inspector functionality than the original Inspect Widget command mentioned by stt106's.
With a debugging session active, open the command palette and find the DevTools command.
The first time you run this you'll may be prompted to activate or upgrade.
DevTools will then launch in your browser and connect to your debug session.
There's more info on the functionality of Dart's DevTools in the DevTools docs.
When debugging, run command Flutter: Inspect Widget, then click on the UI/Widget, it will auto lead you to the code which generates the widget. It only works in debugging mode and the command is not available until the app is loaded in debug.
Updated method:
As of Dart Code (VS code extension) version 2.24.0, The 'Flutter: Inspect Widget' command was replaced with DevTools. (at the time of writing this, the latest version is 3.36.0. To get to the Inspect Widget from the command pallet with >Flutter: Open DevTools or >Dart: Open DevTools, requires several steps.
Here's a quicker way:
Click the debug (bug) button from the side menu and Select Run and Debug or press f5
The Widget inspector will open automatically.
Screenshot of emulator using the Flutter Widget inspector

Chrome inspect element not showing

I have a really weird condition about my chrome browser, the inspect element not showing at all after i right click and i choose "Inspect" and even after i use the shortcut key "Ctrl+Shift+I" it still not showing, what is really happened ?
I have checked "chrome://flags/" and "Debugging for packed apps" and it show me "Enabled" what is really going on with my chrome browser ? i use chrome "68.0.3440.106 (Official Build) (64-bit)".
I have followed some instruction from another web but still the "Inspect" window not showing.
Here some links that i have followed to solve this problem.
https://www.quora.com/How-do-I-resolve-the-issue-in-Chrome-for-inspect-element-if-its-not-showing-up-for-any-website
Google Chrome Dev Tools inspect element styles not showing
Please Help.
In my case, this was the only solution on Mac OS X:
Quit Chrome then delete /Applications/Google Chrome.app.
Delete these folders:
~/Library/Application Support/Google/Chrome
~/Library/Caches/Google/Chrome/Default
Re-install Google Chrome

Setting up Flutter with Visual Studio Code

I am a C# developer, but have been tasked with developing a Flutter app, and I am discovering I have no idea what I am doing. I have a copy of Visual Studio Code and have installed the Flutter SDK, but they aren't working together. The Dart and Flutter extensions are installed, but when I CTRL+SHIFT P and select Flutter: New Project, the prompt disappears and I find myself with nothing changed on the screen. Earlier, I was getting an error that VSCode could not find my SDK.
I am going nuts. Can someone tell me where to start debugging this problem?
Seems that you don't have the SDK installed.
Navigate to the View option on vs code then select Command Palette.
type the word flutter in the palette; it should give you a list of commands, for
instance, creating a new project and flutter doctor.
Select either Flutter: Run flutter doctor of Flutter: run new project
You will get an option at the bottom|right side of vs code to select installation folder for SDK (if you don't have it). You will then be prompted with Project name and location.
To run your sample project, you can use flutter run command.
VS Studio is looking for flutter in predefined folders as indicated in the "View Logs" button. To fix this, Add the flutter\bin folder in your environment variable.
In Windows, right-click "This PC" -> "Properties" -> "Advanced System Settings" -> In "Advanced" Tab, click on "Environment Variables", In "System Variables" section select "Path"
Next click "Edit", click "New" and put the location of the bin folder where flutter is installed.
Restart VS Studio, and re-run flutter doctor.
If you're running Flutter: New Project and then seeing nothing at all, then this is certainly a bug in the extension. It's supposed to prompt you for a project name and location.
If you can still reproduce this, please raise a bug on GitHub and if possible attach an Extension log. There may also be useful information in the dev console (Help -> Toggle Developer Tools).
Flutter setup for VSCode windows
You Need to download flutter libraries either from flutter or git
a. From flutter
https://storage.googleapis.com/flutter_infra/releases/stable/windows/flutter_windows_v1.12.13+hotfix.9-stable.zip
b. From git clone (make sure git is installed in your system)
C:\src>git clone https://github.com/flutter/flutter.git -b stable
Extract or clone flutter libraries in following directory
C:\flutter
Add a new environment veritable path C:\flutter\bin
Run flutter version to check flutter installed correctly
Install VSCode
Install Flutter and Dark extensions in VSCode
Press Ctrl + Shift + P to open command palette. Type in the search bar Flutter and click on Flutter: New Project.
It will create a demo project.
Run flutter to run demo project
Note - You may need to install android studio as it will set android SDK and emulator