Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can Rust breakpoints work when linked to the Flutter app? #41

Open
temeddix opened this issue Dec 15, 2023 · 2 comments
Open

Can Rust breakpoints work when linked to the Flutter app? #41

temeddix opened this issue Dec 15, 2023 · 2 comments

Comments

@temeddix
Copy link
Contributor

temeddix commented Dec 15, 2023

Compilers may embed some debugging information directly into the compiled code or generate separate files (like .pdb for Windows or .dSYM for macOS) that contain debugging symbols and information. These files aid the debugger in correlating the machine code with the original source code.

If such method is possible, it will hugely benefit users using Rinf. Breakpoints will work if we run Rust code directly with cargo run, but will they work if they are linked to a Flutter app?

image

@knopp
Copy link
Contributor

knopp commented Dec 22, 2023

Yes. Debug build will build the rust code with debug symbols. You can attach to running application and debug the rust code.

@hilpara
Copy link

hilpara commented Jun 10, 2024

@knopp I'm trying to get my workflow setup with flutter_rust_bridge and tested debugging. How ever I could not get this to work. I already wrote about it here.
As I wrote I'm using the gallery as an example. On one instance of vscode I started flutter debugger and on the other one I attached to this running process. Attach seems to work, but when I hit the breakpoint, the debugger only shows a message in Debug Console : Stop reason: signal SIGPROF and I can't debug anything.

My launch.json:

{
            "type": "lldb",
            "request": "attach",
            "pid": "${command:pickProcess}",
            "name": "Debug Rust",
  }

So what am I doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants