rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

internal: add probe-rs debug provider

Open Young-Flash opened this issue 6 months ago • 4 comments

close https://github.com/rust-lang/rust-analyzer/issues/19948

Young-Flash avatar Jun 19 '25 14:06 Young-Flash

Should we add it to knownEngines too?

lnicola avatar Jun 19 '25 14:06 lnicola

Should we add it to knownEngines too?

yeah, we need to figure out ProbeRsDebugConfig

Young-Flash avatar Jun 19 '25 15:06 Young-Flash

probe-rs needs to configure the target chip, which seems unsuitable for providing out-of-the-box support in rust-analyzer.

cc @mfp20

Young-Flash avatar Jun 21 '25 06:06 Young-Flash

probe-rs needs to configure the target chip, which seems unsuitable for providing out-of-the-box support in rust-analyzer.

cc @mfp20

In ${workspaceFolder}/.cargo/config.toml there's probe-rs config:

[target.'cfg(all(target_arch = "arm", target_os = "none"))']
runner = "probe-rs run --chip rp2040 --protocol swd --speed 20000"

All projects must have it. AFAIK it is not used by the vscode extension, but it is used by vscode as run config. Maybe you can't support the vscode extension but you can hook to that for basic support. Just an idea.

mfp20 avatar Jun 21 '25 19:06 mfp20