Contribute breakpoints for the "rust" language#9484
Contribute breakpoints for the "rust" language#9484WardenGnaw merged 2 commits intomicrosoft:mainfrom
Conversation
|
fixes #75 for rust only |
|
Do we want to set |
|
I wasn't sure about "languages" as we don't offer any language features for rust? just bp support. I tried disabling the rust-analyzer extension and turned off "bps can be set in any file" and was still able to set bps in .rs files. |
The languages contribute seems to be specific to debugging which we are allowing. https://code.visualstudio.com/api/references/contribution-points#contributes.debuggers |
|
@WardenGnaw updated to contribute languages for rust |
|
Just adding here as a note to update the docs: Edit: Link to doc's md. https://github.com/microsoft/vscode-docs/blob/40f4f497a5954bb5b61c9412d36f381a605336e4/docs/languages/rust.md?plain=1#L247-L249 |
I think so. |
|
Also add vscode-cpptools/Extension/package.json Line 50 in 4a85594 |
Is there a reason we need to? I didn't see any issues without this. |
|
@gregg-miskelly at least from my experience, the debugger wouldn't activate if only viewing rust files, which prevented C++ from showing up as a launch.json template source. I'd need to test again to confirm. |
|
@gregg-miskelly selecting Run and Debug with a .rs file active: selecting it with a .cpp file active: I'm not actually sure what the correct fix is here. I thought it was an issue of extension activation but it appears based on the active editor. C++ doesn't show up for the .rs file even after opening a .cpp file. |
|
@gregg-miskelly @WardenGnaw even if I can get the C++ options to pop up from Run and Debug and I select C++ (Windows), then select Default Configuration, I get this: I'm not sure how far we want to go at this point, given that a lot of this starts to get C++ specific. It'd be nice to get a default config working for Rust, but I feel like its probably non trivial to stand up and support? |
|
I believe this is due to the changes of A lot of the config generation is done by the C++ language service now. |
|
@gregg-miskelly I'm curious how you started debugging rust if at all? Did you manually create a launch.json? Were you just using the inline hints provided by rust-analyzer? |
That is what I saw too. But I wasn't sure if we would want the C++ templates to show up or not. If we do want it, I wonder if a better option is to activate on The reason we might NOT want the C++ templates to show up is that the rust-analyze extension does offer their own templates through the 'Rust Analyzer: Debug' command. |
I tried it three different ways --
|
88feb13 to
650fe77
Compare
Since rust code can be debugged with this extension, contribute breakpoints for the "rust" language such that the workaround of "allow breakpoints in all files" is no longer required.
* Contribute breakpoints for the "rust" language Since rust code can be debugged with this extension, contribute breakpoints for the "rust" language such that the workaround of "allow breakpoints in all files" is no longer required.
|
This change is available in 1.11.2 (pre-release): https://github.com/microsoft/vscode-cpptools/releases |
|
It's actually in 1.10.8 (release) too: https://github.com/microsoft/vscode-cpptools/releases/tag/v1.10.8 |




Since rust code can be debugged with this extension, contribute breakpoints for the "rust" language such that the workaround of "allow breakpoints in all files" is no longer required.