Breakpoints in Rust code in my iOS project

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.

5 comments

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?

0

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.

0

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.

0

+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 :)

0

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 ;-)

0

Please sign in to leave a comment.