Prompt and commands not redirected to --tty option
bitwranglr opened this issue · 3 comments
When using the --tty
option to redirect debugger commands to another terminal, the prompt and commands remain in the original terminal while stack and annotations appear in the --tty
terminal.
This behavior is unlike bashdb where everything debugger related, including prompt and inputted commands, are redirected to the --tty
terminal.
The zshdb behavior makes it impossible to separate out the debuggee's output from the debugger's. I'm assuming it's a bug because it makes no sense to design it this way, or am I missing something? Hope to see this fixed, thanks.
terminal, the prompt and commands remain in the original terminal
I believe [this line](terminal, the prompt and commands remain in the original termina) is doing that
vared -e -h -p "$_Dbg_prompt" line <&${_Dbg_fdi} || break
Of course this is specific to zsh
(and the bashdb equivalent is bash-specifc too I think.)
Hope to see this fixed, thanks.
Are you up to working up a fix and a PR?
I've got a working solution with the prompt and typed debugger commands now nicely appearing in the other tty.
Replace the line:
vared -e -h -p "$_Dbg_prompt" line <&${_Dbg_fdi} || break
with:
print -u${_Dbg_fdi} -n "$_Dbg_prompt"
read line <&${_Dbg_fdi} || break
I'm not sure how to do a pull request...
The above should only be done if the tty option is set. For interactive use, I think vared
is preferred since that allows for command editing and history retrieval.
I'm not sure how to do a pull request...