How to debug Rust like a PRO

preview_player
Показать описание
In this video I'll explain how to setup debug configurations in Rust using Visual Studio Code.

#rust #rusttutorial #rustprogramming #visualstudiocode #debugging #rustlang
0:00 Intro
0:07 New Project
0:52 Example problem
4:08 Breakpoint!
9:40 Break in Release

Thumbnail image from Freepik
Рекомендации по теме
Комментарии
Автор

You should mention in the title that this is editor-specific debugging.

LibreGlider
Автор

very very useful, you helped me tremendously.

matej
Автор

thanks for sharing your skillset. however I cannot work right, and need a help. it seems ${workspaceFolder} is not working. cargo build creates the folder named .exe at the debug folder, not "example".exe and the pop-up error message shows the root folder of rust projects, not the working project folder neither.

neoc
Автор

you don't have to copy some configs around, just make sure you have LLDB(required for mac, but most of the time a good choice for all) installed, press Run and Debug, it will say that it cannot start because there is no launch configuration provided, press ok and it will tell you that cargo.toml has been detected and it asks you if it should create a launch config for its targets. Just press yes and you can start debugging

romanstingler
Автор

Nice. Suggest adding sections/new videos of debugging rust within containers

KartikeyaAgate
Автор

Very helpful video. Can you share a link to the reference for creating custom tasks and launch configs?

abhishekshah
Автор

Why not use CLion with Rust plugin? I don't understand the struggle with feature-poor IDE

xxorza
Автор

imagine someone coming here to see oh these are basics...
lol i dont think there are indiviuals who learn rust before java, html, css, python... and they would already know how to use launch.json, breakpoints, and so on.

hamzakhan-gnue