Debug C++ code from Dart package using dart::ffi Debug C++ code from Dart package using dart::ffi flutter flutter

Debug C++ code from Dart package using dart::ffi


Android Studio (or VS Code) doesn't support native (C/C++) code debugging while in Flutter mode (yet). However, there is a workaround! In the project tree, right-click the 'android' folder and select Flutter -> Open Android module in Android Studio. The project will switch to Android development mode where c/c++ debugging is fully supported. Now just search for the 'cpp' folder, set breakpoints in any of the files there and run the app (while still in the Android development mode of course)!