Debuggin with Dart FFI

542 views
Skip to first unread message

Facundo David Farall

unread,
Jun 12, 2020, 8:44:45 AM6/12/20
to Dart FFI
Hi, is there a way to use the Android Studio debugger when using Dart FFI in a Flutter app?

Daco Harkes 🔵

unread,
Jun 12, 2020, 9:23:23 AM6/12/20
to Facundo David Farall, Dart FFI
Hi Facundo,

I'm not familiar with setting up the Android Studio Debugger.

These are the two things I do:
- use the Dart debugger for Dart code
- use GDB (or the VSCode C++ plugin with GDB integration) on the dart executable for debugging C++ code (in which the Dart stack frames show up as unknown code).

What exactly are you trying to debug? C++ code? Dart code? Or the FFI bindings (e.g. do you get segmentation faults on the de boundary)?

And can you test your code in Dart standalone? (that makes debugging native code easier, since you don't have to deal with Android simulators etc.)

Kind regards,

On Fri, Jun 12, 2020 at 2:44 PM Facundo David Farall <facund...@gmail.com> wrote:
Hi, is there a way to use the Android Studio debugger when using Dart FFI in a Flutter app?

--
You received this message because you are subscribed to the Google Groups "Dart FFI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dart-ffi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dart-ffi/4c022369-818d-4a9f-a5dd-87cd8dd895bdo%40googlegroups.com.


--
Daco Harkes

Facundo David Farall

unread,
Jun 12, 2020, 9:58:16 AM6/12/20
to Dart FFI
Hello Daco,
First of all, thanks for answering so quickly. To be more specific, I'm trying to do a Flutter app, wich uses a C++ backend for signal processing. To achieve that, I'm passing my C++ backend pointers with the data to process, and I'd like to be able to debug that backend, look into local variables and do more than just debug with log messages.
I'm familiar with the VS Code debugger and the Android Studio debugger, but in both, when running the Flutter app I can only debug the Dart front end, and not get into the C++ implementation.
Thanks for any help you can provide.
Regards, 
Facundo Farall 

On Friday, 12 June 2020 10:23:23 UTC-3, Daco Harkes wrote:
Hi Facundo,

I'm not familiar with setting up the Android Studio Debugger.

These are the two things I do:
- use the Dart debugger for Dart code
- use GDB (or the VSCode C++ plugin with GDB integration) on the dart executable for debugging C++ code (in which the Dart stack frames show up as unknown code).

What exactly are you trying to debug? C++ code? Dart code? Or the FFI bindings (e.g. do you get segmentation faults on the de boundary)?

And can you test your code in Dart standalone? (that makes debugging native code easier, since you don't have to deal with Android simulators etc.)

Kind regards,

On Fri, Jun 12, 2020 at 2:44 PM Facundo David Farall <facund...@gmail.com> wrote:
Hi, is there a way to use the Android Studio debugger when using Dart FFI in a Flutter app?

--
You received this message because you are subscribed to the Google Groups "Dart FFI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dart...@googlegroups.com.


--
Daco Harkes

Daco Harkes 🔵

unread,
Jun 15, 2020, 2:24:52 AM6/15/20
to Facundo David Farall, Dart FFI
Hey,

I replied in https://github.com/dart-lang/ffi/issues/47.

Kind regards,

To unsubscribe from this group and stop receiving emails from it, send an email to dart-ffi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dart-ffi/cb2e3c7b-4c72-4f10-87db-fcb52510425fo%40googlegroups.com.


--
Daco Harkes
Reply all
Reply to author
Forward
0 new messages