Open AZMCode opened 3 years ago
Made a pull request to accompany the issue. Haven't tested, but the changes are minor enough I don't think any major considerations are needed. In any case, changes are accepted.
Just tested the pull request with my use-case, and it works marvellously
Edit: Another possible improvement would be the chaining of outputs to the next input in the sequence, but that's beyond the scope of this PR.
Background
I am attempting to code in Rust, and I found the commonly-used
lldb
-based debug plugins to be insufficient for my purposes, so I've switched togdb
.In Rust the default package manager outputs the binary (which I need to debug) to a non-deterministic filename, which makes things complicated. However, the way many of the plugins get around this is by running the package manager
build
command themselves, and asking for JSON output, to parse and retrieve the output filename. However, since there is no native plugin to do this forgdb
, I've had to hodge-podge something myself.After all of this trouble, I've managed to make a bash script, (which is run using the Command Runner extension), that writes the target binary path to a file, and also configured a command to read it out from the file to be used as an input in my
launch.json
, (through the${input:xxxx}
command variable and using the Command Variable extension). I run these two commands in sequence using this very multi-command extension. Sadly, I've discovered that this plugin does not redirect the output of the last command as its own, which leaves my setup useless.Proposed Solution
Take the output of the last command run in a sequence, and output it.