How do I configure VS Code to launch a Flutter Web app with query parameters in the URL?

Viewed 2935

I have been looking for hours online and have had no luck. I'm trying to have VS Code launch a web application using a URL with parameters for debugging purposes. My launch.json file looks like this:

[enter image description here

Despite how I configure this file, the web application always launches with the same URL:

enter image description here

What I need is the URL to look like this:

http://localhost:5000/#/gs?surveyId=123456

and a separate configuration that will launch with a URL that looks like this:

http://localhost:5000/#/p?xr5efG6HU9

Does anyone know how this can be configured using VS Code and the launch.json file? NOTE: I'm running VS Code on a Mac if that makes any difference.

To be clear, I know how to add new configurations, but the thrust of this question is how to get the parameters in the URL upon launch. I'm happy if the parameters are static and are simply copied from the launch.json file.

Many thanks for any help that can be offered!

1 Answers

There is a command line flutter run --route '/route' but currently doesn't work on Web or iOS - Support/Feature Request Here

Only thing I could suggest is using something like Fluro and explicitly defining your parameters on your route, but then copying and pasting your parameters would be more efficient.

When testing URLs with parameters, I just use a clipboard manager to paste the parameters in using a hotkey.

Related