flutter-tools.nvim icon indicating copy to clipboard operation
flutter-tools.nvim copied to clipboard

[Bug]: Launching/attaching Flutter through DAP fails with more than 1 device

Open rlch opened this issue 4 years ago • 4 comments

Describe the bug

More than one device connected; please specify a device with the '-d <deviceId>' flag, or use '-d all' to act on all devices.
macOS (desktop) • macos  • darwin-arm64   • macOS 11.4 20F71 darwin-arm
Chrome (web)    • chrome • web-javascript • Google Chrome 92.0.4515.131
Exited (1)

To Reproduce

  1. Ensure 1+ devices are connected
  2. lua require('dap').continue()

Expected behavior Ideally a devices window should popup; or otherwise we should be able to specify extra flags in the config to use a specific device.

System information

  • OS: macOS Big Sur 11.4
  • Flutter version: 2.2.2 stable
  • Is flutter in $PATH: yes
  • neovim version: 0.5

Thanks for developing this great plugin, it really helped me to fully switch my workflow to neovim. I look forward to improving my lua skills enough to someday contribute!

rlch avatar Aug 12 '21 11:08 rlch

@rlch thanks for raising this. I was actually aware of this as I've hit it myself. Currently I don't really know how to fix it tbh. I need to interact with dap in some way to have it return the error to me programatically so I can then show a picker and then pass the selected id back to dap somehow.

Not really sure exactly how to do this and also not really got the time to do it currently.

akinsho avatar Aug 13 '21 10:08 akinsho

@akinsho No problem :)

I'll try have a look into it when I get some time!

rlch avatar Aug 13 '21 10:08 rlch

This should be working with the dap-based runner introduced in https://github.com/akinsho/flutter-tools.nvim/pull/108

clement-buchart avatar Nov 21 '21 18:11 clement-buchart

I've experienced a similar issue but even without using flutter-tools, i.e., just directly using nvim-dap. I started a discussion here just a couple a days ago. Please have a look when you get the chance. Seems to me like a nvim-dap issue at this point.

https://github.com/mfussenegger/nvim-dap/discussions/599

shashanknimje avatar Jul 06 '22 07:07 shashanknimje