-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flutter Web: Specify Chrome port number? #1769
Comments
It's not currently possible to specify that port from VS Code. I think it should be easy enough to add though. In the meantime, if you start the app manually (by running |
Apparently it's not easy to add, it needs support in webdev (the above arguments don't apply to |
This is now possible with Flutter's {
"name": "Flutter",
"request": "launch",
"type": "dart",
"args": ["--web-port", "8686"]
}, You could also set it in Note: This only works with the unforked web support (which isn't available on the master branch). |
@DanTup I can specify a port number when I run flutter from command line using
|
@Ollynov you appear to have two launch configurations there, so unless you're selecting the second one (named Flutter) on the Run side bar, it won't be having any effect. You an merge these together into a single config that should fix this: {
"name": "Flutter (port 7375)",
"type": "dart",
"request": "launch",
"program": "lib/main.dart"
"args": ["--web-port", "7357"]
} |
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi, I'm using the following launch.json. {
"configurations": [
{
"name": "Flutter (Chrome)",
"program": "lib/main.dart",
"deviceId": "chrome",
"request": "launch",
"type": "dart"
},
{
"name": "Flutter Port 8000",
"program": "lib/main.dart",
"deviceId": "chrome",
"request": "launch",
"type": "dart",
"args": ["--web-port", "8000"],
}
]
} Default configuration works fine. But when launching with the second, the program correctly stops at breakpoints but it doesn't show the call stack or variables, or even the breakpoint in the editor. Is this a known limitation when specifying port ? Or can I provide more information to help debug this problem ? |
@cladelpino it's not a known limitation - changing the port should not really impact this at all. Can you file a new issue about this, and include:
Thanks! |
Hi
In a Flutter Web project, when I "Start Without Debugging",
a Chrome window opens on a random port
However, to do functional tests, I'd like to specify the port
Is there a config where I can specify that port number?
The text was updated successfully, but these errors were encountered: