-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
quit
always terminates the debugger and not just the subshell of the debugged program
#54
Comments
Thanks for the report. I will try to look at this over the weekend when I have time. |
Thank you for isolating this problem. I can confirm what you report. To sum up what you write, something is causing vared -e -h -p "$_Dbg_prompt" -t "$_Dbg_tty" line to give a 1 return code. I get the same result if options Looking at https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Zle-Builtins and the I agree this is probably in the Here is a sample script that succeeds. typeset line=''
setopt extendedhistory extendedglob shwordsplit ksharrays histignoredups zle rematchpcre bashrematch localtraps
vared -p "type something: " -t $(tty) line
echo you typed: $line
line=""
unsetopt extendedhistory extendedglob shwordsplit ksharrays histignoredups zle rematchpcre bashrematch localtraps
set -569Xf
vared -p "type something else: " -t $(tty) line
echo you also typed: $line If we can get the second I will look more later. This weekend I may be crimped for time though. |
I looked at this more and things are a mess. The problem has nothing to do with So instead of issuing an I haven't however been able to get all of this working properly though. |
Tests have been corrected now. And changes have now been merged to master. See if this addresses the problems. If so, close the ticket. If not, the elaborate. Sorry for the delay. |
Thank you! This is working well for me now... |
test-frame
ofmake check
is failing on my system (and also on CI, I think).I tried to debug this and was able to create a simple script to reproduce. I'm not entirely sure that it's the main cause, but it seems like a bug to me.
When the debugged script is stopped inside a subshell, then
quit
does not just quit the subshell, but the complete zshdb debugger.bashdb
on the same script is correctly terminating only the subshell.File used for testing:
zshd commands used for testing:
In the log below please note that "zshdb: That's all, folks..." is printed twice.
I've tracked this down to this line in processor.sh on my system.
vared
is terminating with status code1
, which then terminates the loop to run commands. Disablingvared
(by using the code of theelse
branch) fixed the bug for me. My suspicion is that a hook/trap handler is causing this, but I wasn't able to find out.The text was updated successfully, but these errors were encountered: