官术网_书友最值得收藏!

How it works...

Rust is built on the LLVM compiler toolkit that comes with a range of features out of the box. When a Rust program compiles, it only gets translated into an intermediate language, from which the LLVM compiler creates native bytecode.

This is also the reason why debugging can work in this case—it builds on the LLVM debug symbols. While it clearly lacks the convenience of modern IDEs, it's a large step forward and allows users to inspect types. Future development of the tools will hopefully improve this situation as well; for now, the general debugger, GDB (https://www.gnu.org/software/gdb/), handles most of the cases where debug symbols are compiled into the program. The configuration for connecting the debugger with the code in the IDE can be found in step 2 and, by setting the breakpoint in step 4, it can track the relationship between lines of code and output. With the default setting to compile to debug, the debugger can then stop at this exact point. While it's not perfect (on the UX side), its capabilities are amazing. 

Even this simple connection to a (UX-wise) very basic debugger can have great benefits for developers and represents a huge step up from println!() statements to inspect the current value of a variable. 

We hope that you can use the debugger's capabilities in the remainder of this book. With this knowledge, you can now move on to the next chapter.

主站蜘蛛池模板: 和田县| 通道| 开封市| 克什克腾旗| 镇宁| 富锦市| 龙州县| 嘉峪关市| 农安县| 富锦市| 秦皇岛市| 大港区| 杨浦区| 乌苏市| 百色市| 曲阜市| 扬中市| 尼勒克县| 资兴市| 宜君县| 开鲁县| 个旧市| 桦甸市| 和平县| 黎城县| 肥西县| 犍为县| 海宁市| 孙吴县| 孟州市| 来凤县| 织金县| 拜城县| 冀州市| 九台市| 兴安盟| 牙克石市| 永济市| 漾濞| 永福县| 得荣县|