Skip to content

Commit

Permalink
Fix debugger imgui id clashes
Browse files Browse the repository at this point in the history
  • Loading branch information
aardappel committed Jan 9, 2025
1 parent bc15f59 commit d28d88b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dev/src/imbind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,15 +698,18 @@ void DumpStackTrace(VM &vm) {

auto cur_fileidx = vm.last_fileidx;
auto cur_line = vm.last_line;
int i = 0;
for (auto &funstackelem : reverse(vm.fun_id_stack)) {
auto [name, fip] = vm.DumpStackFrameStart(funstackelem.funstartinfo, cur_fileidx, cur_line);
ImGui::PushID(i++);
if (ImGui::TreeNode(name.c_str())) {
if (BeginTable(name.c_str())) {
vm.DumpStackFrame(fip, funstackelem.locals, dumper);
EndTable();
}
ImGui::TreePop();
}
ImGui::PopID();
cur_fileidx = funstackelem.fileidx;
cur_line = funstackelem.line;
}
Expand Down

0 comments on commit d28d88b

Please sign in to comment.