O'Reilly logo

Mastering Rust by Vesa Kaihlavirta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14 - Debugging

A compiled Rust program is close enough to a compiled C program that with just a small wrapper, the same debugging tools can be used effectively. Debugging practically requires instrumentation code in the binary, which the Rust compiler defaults to.

GDB and LLDB can both be used for debugging Rust binaries. Their primary use case is to step through the code line by line, while investigating the state of the program. Also threads can be manipulated in this way.

To make the debugging experience smoother, the debugging tools can be integrated to most text editors.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required