vim-patch:8.0.1217: remote eval to inspect vars in :debug #10903

Problem:    Can't use remote eval to inspect vars in debug mode.
Solution:   Don't discard the call stack in debug mode. (closes vim/vim#2237, vim/vim#2247)
d99388ba85
This commit is contained in:
Jan Edmund Lazo 2019-09-01 11:42:47 -04:00 committed by Justin M. Keyes
parent e29b89ca54
commit 57327bb483
2 changed files with 4 additions and 1 deletions

View File

@ -159,6 +159,7 @@ void do_debug(char_u *cmd)
redir_off = true; // don't redirect debug commands redir_off = true; // don't redirect debug commands
State = NORMAL; State = NORMAL;
debug_mode = true;
if (!debug_did_msg) { if (!debug_did_msg) {
MSG(_("Entering Debug mode. Type \"cont\" to continue.")); MSG(_("Entering Debug mode. Type \"cont\" to continue."));
@ -337,6 +338,7 @@ void do_debug(char_u *cmd)
msg_scroll = save_msg_scroll; msg_scroll = save_msg_scroll;
lines_left = (int)(Rows - 1); lines_left = (int)(Rows - 1);
State = save_State; State = save_State;
debug_mode = false;
did_emsg = save_did_emsg; did_emsg = save_did_emsg;
cmd_silent = save_cmd_silent; cmd_silent = save_cmd_silent;
msg_silent = save_msg_silent; msg_silent = save_msg_silent;

View File

@ -655,9 +655,10 @@ EXTERN char_u *fenc_default INIT(= NULL);
/// finish_op : When State is NORMAL, after typing the operator and /// finish_op : When State is NORMAL, after typing the operator and
/// before typing the motion command. /// before typing the motion command.
/// motion_force: Last motion_force from do_pending_operator() /// motion_force: Last motion_force from do_pending_operator()
/// debug_mode: Debug mode
EXTERN int State INIT(= NORMAL); // This is the current state of the EXTERN int State INIT(= NORMAL); // This is the current state of the
// command interpreter. // command interpreter.
EXTERN bool debug_mode INIT(= false);
EXTERN bool finish_op INIT(= false); // true while an operator is pending EXTERN bool finish_op INIT(= false); // true while an operator is pending
EXTERN long opcount INIT(= 0); // count for pending operator EXTERN long opcount INIT(= 0); // count for pending operator
EXTERN int motion_force INIT(=0); // motion force for pending operator EXTERN int motion_force INIT(=0); // motion force for pending operator