Skip to content

Commit 28a9910

Browse files
author
brianradunity
committed
This fixes an issue we are seeing with VSTU debgugging in Unity. (mono#7634)
process_breakpoint() will process breakpoint, stepping, and method exit/entry events all at the same time when checking a sequence point. So, if there is is a breakpoint and a stepping event at the same time, the debugger agent will suspend the current thread twice, which means you have to click the step button in the debugger client twice on that line. Considering only one of these events at a time seems to fix the issue without breaking any current unit tests or showing any other noticeable issues in testing.
1 parent fd2dd4c commit 28a9910

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mono/mini/debugger-agent.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5531,9 +5531,9 @@ process_breakpoint (DebuggerTlsData *tls, gboolean from_signal)
55315531

55325532
if (ss_reqs->len > 0)
55335533
ss_events = create_event_list (EVENT_KIND_STEP, ss_reqs, ji, NULL, &suspend_policy);
5534-
if (bp_reqs->len > 0)
5534+
else if (bp_reqs->len > 0)
55355535
bp_events = create_event_list (EVENT_KIND_BREAKPOINT, bp_reqs, ji, NULL, &suspend_policy);
5536-
if (kind != EVENT_KIND_BREAKPOINT)
5536+
else if (kind != EVENT_KIND_BREAKPOINT)
55375537
enter_leave_events = create_event_list (kind, NULL, ji, NULL, &suspend_policy);
55385538

55395539
mono_loader_unlock ();

0 commit comments

Comments
 (0)