Skip to content

Commit 02e341b

Browse files
author
Brian Raderman
committed
unity_process_breakpoint_inner(), like its Mono counterpart, 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. The fix for this is to only consider one of these events at a time and ignore the others.
1 parent d37a5bf commit 02e341b

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
@@ -12277,9 +12277,9 @@ unity_process_breakpoint_inner(DebuggerTlsData *tls, gboolean from_signal, Il2Cp
1227712277

1227812278
if (ss_reqs->len > 0)
1227912279
ss_events = create_event_list(EVENT_KIND_STEP, ss_reqs, sequencePoint, NULL, &suspend_policy);
12280-
if (bp_reqs->len > 0)
12280+
else if (bp_reqs->len > 0)
1228112281
bp_events = create_event_list(EVENT_KIND_BREAKPOINT, bp_reqs, sequencePoint, NULL, &suspend_policy);
12282-
if (kind != EVENT_KIND_BREAKPOINT)
12282+
else if (kind != EVENT_KIND_BREAKPOINT)
1228312283
enter_leave_events = create_event_list(kind, NULL, sequencePoint, NULL, &suspend_policy);
1228412284

1228512285
mono_loader_unlock();

0 commit comments

Comments
 (0)