Introduce VSCode rust
debug type.
#5369
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a VSCode-native debug engine integration for rust code.
Well, it's not a real rust debug engine, and internally reuses lldb or ms cpptools as before. But in VSCode UI it looks like a special rust debugger :)
Important note: The PR requires at least 1.46 VSCode engine, so maybe we shouldn't merge it until July VSCode release (1.48 https://github.com/microsoft/vscode/milestone/124).
On the other hand, it might be a good idea to test the code on the nightly version.
Introduced features:
Now it is possible to use special "rust" debugger in the launch.json:
You can use launch.json snippets for rust:
Or generate configuration directly from VSCode
Select and start debugging
peeker (it looks for runnables in the current file).Of course, you don't have to create debug configurations and can just use this peeker to start debugging without bothering with launch.json.
P.S. I did not delete existing "rust-analyser.debug" and "rust-analyzer.newDebugConfig" commands but I think that in long term we should remove at least the latter. The former might still be useful for keybindings.