Search code examples
iosfluttervscode-debugger

Physical device (iPad) not detected in vs code for flutter but detected and working proper for debugging in Xcode


Here's my Environment

  • Xcode Version: 11.1 (11A1027)
  • Physical device: - iPad mini 2 (IOS 12.4.2)
  • VSCode Version: 1.39.2
  • Flutter version: 1.9.1+hotfix.6

When I use the iOS part of the Flutter project and run it physical device using XCode, it detects the device and works fine but I am somehow not able to see the device on the available devices section on VSCode.

However VSCode detects and works fine with the simulator.

I also ran flutter doctor to see connected devices, but again it does not show the connected physical devices but shows the simulator created device.


Solution

  • Use rm -rf <flutter_repo_directory>/bin/cache to force delete the files in cache and then flutter doctor -v to reinstall the missing sdk directories.

    Deleting the cache in flutter/bin/cache directory and then reinstalling the dart sdk solved this issue.

    Referred to this issue in Flutter repository(Issue No:41006).