Skip to content

akashsoni01/rust_poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

105 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cargo_project

Set up the debugger for a Rust POC (Proof of Concept) project using Visual Studio Code and LLDB. Here's a step-by-step guide to get you started:

  1. Install Required Software:

    • Make sure you have Visual Studio Code (VS Code) installed on your system. You can download it from the official website: https://code.visualstudio.com/
    • Install the "CodeLLDB" extension for Visual Studio Code. This extension provides LLDB debugging support for Rust. You can install it by searching for "CodeLLDB" in the VS Code Extensions Marketplace.
  2. Configure Rust Environment:

  3. Create a New Rust Project (if applicable):

    • If you don't have a Rust project already, create a new one using the following command in your terminal:
      cargo new my_project_name
      cd my_project_name
      
  4. Open Your Project in Visual Studio Code:

    • Open VS Code and navigate to the root folder of your Rust project by selecting "File" -> "Open Folder" from the menu.
  5. Create a Launch Configuration:

    • Inside your project's root folder, create a new file named .vscode/launch.json. Copy and paste the configuration you provided in your question into this file.
  6. Modify the Launch Configuration:

    • Replace <executable file> in the "program" attribute with the actual path to the compiled executable of your Rust project. In Rust, the compiled executable is usually placed in the "target/debug/" or "target/release/" directory, depending on whether you build with debug or release mode.
    • If you want to pass command-line arguments to your program during debugging, you can add them to the "args" array in the launch configuration.
  7. Start Debugging:

    • Now that you have the launch configuration set up, you can start debugging your Rust POC project.
    • Place breakpoints in your Rust code by clicking on the gutter area (to the left of the line numbers) in VS Code.
    • Click on the "Run and Debug" icon in the Activity Bar on the side panel of VS Code (or use the F5 key) to start debugging your Rust project.
    • The debugger will launch LLDB, load your Rust executable, and stop at the breakpoints you set.
    • You can use various debugging features like stepping through code, inspecting variables, and more.

About

OSLP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published