| 496 | } |
| 497 | |
| 498 | void ScriptEditorDebugger::_msg_stack_dump(uint64_t p_thread_id, const Array &p_data) { |
| 499 | DebuggerMarshalls::ScriptStackDump stack; |
| 500 | stack.deserialize(p_data); |
| 501 | |
| 502 | stack_dump->clear(); |
| 503 | inspector->clear_stack_variables(); |
| 504 | TreeItem *r = stack_dump->create_item(); |
| 505 | |
| 506 | Array stack_dump_info; |
| 507 | |
| 508 | int i = 0; |
| 509 | for (List<ScriptLanguage::StackInfo>::Iterator itr = stack.frames.begin(); itr != stack.frames.end(); ++itr, ++i) { |
| 510 | TreeItem *s = stack_dump->create_item(r); |
| 511 | Dictionary d; |
| 512 | d["frame"] = i; |
| 513 | d["file"] = itr->file; |
| 514 | d["function"] = itr->func; |
| 515 | d["line"] = itr->line; |
| 516 | stack_dump_info.push_back(d); |
| 517 | s->set_metadata(0, d); |
| 518 | |
| 519 | String line = itos(i) + " - " + String(d["file"]) + ":" + itos(d["line"]) + " - at function: " + String(d["function"]); |
| 520 | s->set_text(0, line); |
| 521 | |
| 522 | if (i == 0) { |
| 523 | s->select(0); |
| 524 | } |
| 525 | } |
| 526 | emit_signal(SNAME("stack_dump"), stack_dump_info); |
| 527 | } |
| 528 | |
| 529 | void ScriptEditorDebugger::_msg_stack_frame_vars(uint64_t p_thread_id, const Array &p_data) { |
| 530 | inspector->clear_stack_variables(); |
nothing calls this directly
no test coverage detected