Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter VS Code attaching to app after app has been terminated to Debug deeplinks

This is proving very difficult for me to debug. On Android, a FlutterFire deep link opens the App, but there are no URL data in the link. On iOS it is fine.

Debugging this isn't easy. I can run the App on the Emulator from VSCode, but to debug from terminated states I need to swipe the App up, but as soon as I do this I lose the debug connection.

Is it possible to reattach the debugger to the Android App after termination using VSCode?

And secondly,

Are there any command-line arguments that would pass the deep link on the initial run in the same way that it would get it from a terminated state?

I tried -d, but that doesn't work at all. I've hunted high and low for examples but come up with nothing.

Any pointers would be hugely appreciated.

like image 386
paulinventome Avatar asked Oct 27 '25 03:10

paulinventome


2 Answers

Run the app in release mode so you can also run it when it is in closed state. use this command: flutter run --release

like image 137
Siddharth Sogani Avatar answered Oct 29 '25 19:10

Siddharth Sogani


I know this question is very old, but since it is the first question you will find on this topic. I will link to the answer, which includes a workaround (not a good one, but better than nothing) https://stackoverflow.com/a/78205185/22264456

like image 44
FrankAi Avatar answered Oct 29 '25 18:10

FrankAi