code-debug
code-debug copied to clipboard
Run gdb commands before connection #97
It would be cool if environment-directory and target-select could also be inside the autorunBeforeCmds array. In line 232 where you only have sendCommand right now you would need to add .replace(/\$escaped_cwd/g, escape(cwd)).replace(/\$cwd/g, cwd).replace(/target/g, target) after the command string. This would make it much more configurable and it is really easily done like that. Then you can add "environment-directory \"$escaped_cwd\"" and "target-select remote $target" to the autorunBeforeCmds array
It cross my mind to do as you say. But as i am not very good at typescript/JS, I though there was a much better way to do so i didnt do it. Thanks to your help. I'll check on that.
If you need any more help or suggestions, just push the code and I can use the github review feature. I think it's important to add this to SSH too, but you don't need to do that, that can be done in a separate PR or commit by me if you don't want to do it
Ssh is not needed for me but I will code the improvement for this use case also. I have some other ideas ;)
What is the state of this PR? Is it a draft? Is it abandoned?
It's been a while... I'd like to take that up on current master (ideally after #323 and #316 were merged as those change the initialization):
- adding the
initializeToDefault()- and/or possibly #327 instead - add the new setting (I'd prefer "beforeConnect" instead of
autorunBeforethough) - "update" the async setting, see #297
Opinions?