How can I trigger breakpoints when attaching to app using `flutter attach` command?

Viewed 113

What am I doing?

I have a native iOS app, I wrote a Flutter module for a new feature and integrated it into the current native app. In order to use cool Flutter features like Hot Reload, I launched the native app in an iOS Simulator, then I open my Flutter project folder in my VSCode and ran flutter attach to attach the Flutter debugger to the native app, as I opened the Flutter made screen, then it was connected, and whenever I make a change in Flutter code, I can hit r to trigger a hot reload to see the update on the screen.

What is the problem?

I wanted to debug some code so I put some breakpoints, then I triggered a hot reload to run the code which refreshes the UI, the UI was refreshed but...none of my breakpoints was triggered.

Question:

Why hadn't these breakpoints been triggered? If I can not use breakpoints, how can I debug something like this under this situation?

Thanks!

0 Answers
Related