flutter-tools.nvim
flutter-tools.nvim copied to clipboard
[Bug]: Launching/attaching Flutter through DAP fails with more than 1 device
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
- Ensure 1+ devices are connected
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 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 No problem :)
I'll try have a look into it when I get some time!
This should be working with the dap-based runner introduced in https://github.com/akinsho/flutter-tools.nvim/pull/108
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