4 ms·
Maybe someone can give me idea, how can I debug this particular rust app, which is extremely annoying. It's a one of Rustdesk. It won't run if I compile with d
by t_mahmood 1y ago
Maybe someone can give me idea, how can I debug this particular rust app, which is extremely annoying. It's a one of Rustdesk.
It won't run if I compile with debug info. I think it's due to a 3rd party proprietary library. So, to run the app I have to use release profile, with debug info stripped.
So, when I fire up gdb, I can't see any function information or anything, and it has so many system calls it's really difficult to follow through blindly.
So, what is the best way to handle this?
- mrugge 1y agoclaude code cli
- yrand 1y agoCould you expand on what you meant? I'm curious. Not related to OP, but debugging is often about finding where an invariant is broken, so it feels like using LLM to navigate a debugging loop may be useful as it's not a complicated but repetitive task. However in the morning I struggle to imagine how to do that.
- mrugge 1y agoI use claude code all day long to debug gnarly legacy code. Sometimes in languages I barely know. It works great especially as a second opinion or to get unstuck. It is very fun but can be addictive and exhausting.
- mrugge 1y agoMore specifically I will stub out a simple unit test by hand to zoom in on where I think the issue is. It then turns into an exhilarating and wild ride from there.
- tomjakubowski 1y agoYou can add debug info to release builds. In Cargo.toml: [profile.release] debug = true https://doc.rust-lang.org/cargo/reference/profiles.html#debug https://doc.rust-lang.org/cargo/reference/profiles.html#debu...
- t_mahmood 1y agoYes, tried that, but it still failed.
- yrand 1y agoI'd investigate why it won't run with debug info in the first place. That feels like the core problem here, because it prevents you from using some debug tools. Of course that may require digging down pretty low, which is difficult in itself. Edit: also there's split-debuginfo which puts debug info in separate file. It could help if the reason you can't run it is the debug info itself. Which feels unlikely, but :shrug:.
- t_mahmood 1y agoI tried to generate split-debuginfo, and it created another compiler issue in another library, haha, and I was too tired to dig more into it. Curious if it's possible could it be because of protobuf implementation, which is used between UI and the server, and my error is occurring on the UI side. So, after reading a bit, this is what I find >Deterministic serialization is not canonical. The serializer can generate different output for many reasons, including but not limited to the following variations: > The binary is built with different flags (eg. opt vs. debug). My knowledge on this is pretty limited, so I could be wrong. But, this could be a reason. Maybe someone more knowledgeable on this matter can shade some lights. And I should've studied more on this before ... heh.