Breakpoints in Rust code in my iOS project
Answered
AppCode already has good overall support for Rust because of the Rust plugin, but it still doesn't let you set breakpoints in Rust code, unlike, for example, CLion. Setting breakpoints in Rust code should basically be the same as setting breakpoints in Objective-C code: you tell LLDB the line number and file, and it will use the dSYM file to see when that location is hit. Rust already does a good job of generating a dSYM file for itself, so all AppCode has to do is send the same messages to LLDB for Rust files as it does for Objective-C files.
Please sign in to leave a comment.
Rust plugin is now officially supported by JetBrains. At the moment we are working to make it available in CLion (including debugging experience).
Regarding AppCode it's undecided, could you please share your use case? Why do you need Rust in AppCode?
I'm using Rust in AppCode because I've created a Rust library that I share between my iOS and Android projects, and I'd like to test it on actual devices.
Rust is a good choice for mobile because of the resource constraints of mobile apps (and is coming out with projects like https://wiki.mozilla.org/Quantum/Stylo), but debugging support is perhaps the biggest issue, because neither Xcode nor AppCode currently support this. If AppCode was to implement this, it would make Rust much more attractive on AppCode than on Xcode.
+1 for this, would be a great feature. I imagine something in the code right now like:
if (file ends with .m, .mm, .c, or .cpp) {
allow breakpoint to be set
}
we just need to change that if statement :)
I'm testing some languages to share libraries between Android and iOS applications and debugging is my biggest limit for choosing RUST. If I can debug with AppCode I select it now ;-)
Any movement on this? I'm also looking at using Rust for cross platform core code within native apps for each platform. If its working in CLion then I don't see why it can't also work in AppCode?
Intellij-Rust doesn't still support debugger in AppCode because of some technical reasons. But we are going to solve this issue and enable debugger support in AppCode. See https://github.com/intellij-rust/intellij-rust/issues/2273 for more details