1

I recently added

        {
            "name": "Flutter Web",
            "request": "launch",
            "type": "dart",
            "args": ["-d", "chrome","--web-port", "9000", "--web-enable-expression-evaluation"],
        },

to my launch.json, since I need to specify a port for my flutter web debugging. But not, I'm finding it hard to switch back to ios or android. Vscode only wants to debug what is in the launch.json. Any suggestions on how to add android/ios debug configurations to the launch.json?

1 Answer 1

2

enter image description here

You can add new configura and switch it in Run.

4
  • thank you for responding. do you know how to set one of these targets to ios and one to android? ideally, I'd like to be able to switch between the web/ios/android.
    – foobar8675
    Commented Apr 7, 2021 at 17:30
  • @foobar8675 1.select device on VSCode.It's in the bottom right corner. 2.VSCode -> View -> Command Palette -> Flutter: select device. 3. configura add args “-d xxxx"
    – VillainLin
    Commented Apr 8, 2021 at 1:55
  • Thank you VillainLin!
    – foobar8675
    Commented Apr 8, 2021 at 16:56
  • So is there no way to add a different device to the Build & Run configuration? Can you only click the device in the bottom-right of VS Code to change the target? Commented Aug 12, 2022 at 4:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.