Skip to content

Debugging Rust Application #7

@angelozerr

Description

@angelozerr

Feature or enhancement

It would be nice to provide the capability to debug Rust application.

As LSP4IJ supports codelens, you should see Run/Debug codelens

Image

When you click on those codelens, it will run/debug Rust application

Proposed solution

As LSP4IJ supports DAP debugger, I suggest that you implement a DAP debugger https://github.com/redhat-developer/lsp4ij/blob/main/docs/dap/DeveloperGuide.md by using codelldb

LSP4IJ provides a codelddb DAP template. You can play with it to see it in action:

  1. create an exe of your app with cargo build
Image

click on create new server hyperlink

Image

choose codelldb

Image

click on OK

Select the exe that you have created

Image

Set a breakpoint to your rust file and launch the debug,

codelldb should be downloaded

Image

and it should stop to your breakpoint and you should see stack traces, variables etc

Image

Please note that I am working on Dissambly support which should available soon. Here a demo:

Image

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions