Is there any ways to change dart devtools "host" in VSCode? - flutter

I can do it in command-line like this.
"dart devtools --host='host'"
How to do it in VSCode?
I know how to change 'port'. I want to change 'host', like "0.0.0.0:9100"

Related

VSCode: Quickly switch between flutter versions

So, I’m using flutter version 2.2.3 and can’t upgrade right now. But, my other project need higher SDK. I know, there is FVM. But I found this: How to use two version of flutter on same device for different projects? and cite the article: https://dartcode.org/docs/quickly-switching-between-sdk-versions/
The article said, we can quickly switch flutter version via clickable status bar after applied git worktree. But, in my VSCode, flutter version not clickable.
Any suggestion please?
I’ve found the answer:
Open workspace setting with CMD + SHFT + P, I choose not JSON version
Search for “SDK”
Add item with both of flutter version (mine: /User/me/flutter and /User/me/flutter-master)
And voila! I can choose other versions
FVM is a good choice, but if you want to use built-in mechanism, you'll have to:
Download different Flutter versions (from here)
In VSCode set SDK paths (inside .vscode/settings.json file for single project or globally in settings):
{
"dart.sdkPaths": [
"/Users/user/flutter/stable"
"/Users/user/flutter/beta"
]
}
if you are using vs code you can click ctrl+shift+p or command+shift+p
and search for "select SDK" and select your SDK.

Add Arguments to dartfmt in VSCode

I am currently using vscode for flutter and dart development and wanted to increase line length from 80 to 120 characters (which can be achieved by dartfmt -l 120). However, there does not seem to be a way to directly set that in the VSCode Flutter and Dart Extension. Is it possible to do this?
The VS Code Dart extension (version 3.18.1 as of writing) provides a "Dart: Line Length" option (dart.lineLength).

Run dart code continusously on save in VScode

I am new to dart.
I have configured, dart + flutter + vscode etc. In the vscode i am able to run .dart file through Debug panel.
What I want it to run the program on file save. Just like I do in node.js using nodemon package. it watches the files save and rerun the app.
Is something like this possible in VSCode.
This looks promising. He modified Save and Run Ext plugin for VS Code
Go to Vs code settings
next type flutter hot on search box.
then select these two options

Get Dart Devtools to open in Chrome

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"

There a way to swapping instances of only the application VSCode?

I'm new to VSCode (Visual Studio Code) and I'm coming from WebStorm.
When I used WebStorm I was able to use Command + ` to swap instances of WebStorm windows. This behavior is also found in Chrome when you use that shortcut to switch between Chrome windows.
Is there a way to do this on VSCode?
Two options using VS Code:
The workbench.action.switchWindow keybinding to select the window to switch to. It is bound to ctrlw by default
The workbench.action.quickSwitchWindow command. Unlike workbench.action.switchWindow, it automatically switches windows when you release the keys. It is not bound by default but you can configure a keybinding for it.
The OS may also provide this:
Mac: cmd`
Windows