Rust-analyzer: VsCode: generate configuration for debugging

Created on 4 Mar 2020  Â·  3Comments  Â·  Source: rust-analyzer/rust-analyzer

This is a feature request. VS Code has built-in support for debugging through CodeLLDB and VS Code cpptools. These extensions can generate configuration for launch.json through a menu that looks like this:

Slice 1

Getting the configuration right for Rust projects is a bit of a tricky one, with some nuance on how to properly target binaries, libraries, and tests across all major platforms. Since rust-analyzer is providing a premier Rust experience in VS Code, this might be an interesting feature to add.

References

  • I believe this section outlines how to add this functionality to VS Code extensions.
  • This post shares a basic debugging setup for VS Code.

Most helpful comment

nope, to run a test you need to know what a test is, and, with macros, only
rust-analyzer can really know that.

On Thu, 5 Mar 2020 at 10:10, Veetaha notifications@github.com wrote:

Isn't this the domain of vscode-lldb
https://github.com/vadimcn/vscode-lldb extension?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/rust-analyzer/rust-analyzer/issues/3441?email_source=notifications&email_token=AANB3M3KOX2S3DBKQ5Q63ITRF5T65A5CNFSM4LBEJDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN4LITY#issuecomment-595113039,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANB3M7N7YLO3ACJE6RQ5S3RF5T65ANCNFSM4LBEJDFA
.

All 3 comments

Isn't this the domain of vscode-lldb extension?

nope, to run a test you need to know what a test is, and, with macros, only
rust-analyzer can really know that.

On Thu, 5 Mar 2020 at 10:10, Veetaha notifications@github.com wrote:

Isn't this the domain of vscode-lldb
https://github.com/vadimcn/vscode-lldb extension?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/rust-analyzer/rust-analyzer/issues/3441?email_source=notifications&email_token=AANB3M3KOX2S3DBKQ5Q63ITRF5T65A5CNFSM4LBEJDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN4LITY#issuecomment-595113039,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANB3M7N7YLO3ACJE6RQ5S3RF5T65ANCNFSM4LBEJDFA
.

https://github.com/rust-analyzer/rust-analyzer/pull/4366 already has the code to generate launch configurations, so I'll start work on this issue.

Was this page helpful?
0 / 5 - 0 ratings