Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Command Output #50

Open
AZMCode opened this issue Aug 23, 2021 · 2 comments
Open

[Feature Request]: Command Output #50

AZMCode opened this issue Aug 23, 2021 · 2 comments

Comments

@AZMCode
Copy link

AZMCode commented Aug 23, 2021

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 to gdb.

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 for gdb, 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.

AZMCode added a commit to AZMCode/vscode-multi-command that referenced this issue Aug 23, 2021
@AZMCode
Copy link
Author

AZMCode commented Aug 23, 2021

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.

@AZMCode
Copy link
Author

AZMCode commented Aug 23, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant