probe-rs / vscode

VSCode debug extension for probe-rs. It uses the MS DAP protocol to communicate directly with the probe (via probe-rs), and supports basic command line debugging in addition to VSCode UI.
https://probe.rs/
Other
65 stars 6 forks source link

Support homedir references (`~` or `$HOME`) in runtimeExecutable config #18

Closed dbrgn closed 2 years ago

dbrgn commented 2 years ago

This allows using paths like ~/.cargo/bin/probe-rs-debugger instead of hardcoding your username.

bors[bot] commented 2 years ago

Build succeeded:

Tiwalun commented 2 years ago

VS Code supports environments variables natively, using ${env:HOME} according to the docs.

I would suggest that we use the standard solution, instead of adding a new convetion with $HOME.

Yatekii commented 2 years ago

I like using the official solution too. And ofc they made this so configs can be consistent between OSes. And not resort to a way that is normally coined for one OS (Linux/Tilde). Could you try if this works for you @dbrgn?

@Tiwalun if so, would you like this to be reverted? Atm I do not see any harm done if it stays in. But I might overlook some caveats here.

noppej commented 2 years ago

I concur with @Tiwalun and @Yatekii that we should stick with the official solution. In the short term there is not much harm with having this code in the repo, but in the long run, it will contribute to code / maintenance complexity.

@dbrgn We definitely do not want to discourage you from contributing. This extension has a lot of room for awesome contributions. Is there a reason that stops you from using the builtin variable substitution from VSCode? Would you object to rolling back these changes?

dbrgn commented 2 years ago

Ah, I simply wasn't aware of this possibility! I'll create a revert PR.