MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / RemoteDebugger

Method RemoteDebugger

core/debugger/remote_debugger.cpp:736–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

734}
735
736RemoteDebugger::RemoteDebugger(Ref<RemoteDebuggerPeer> p_peer) {
737 peer = p_peer;
738 max_chars_per_second = GLOBAL_GET("network/limits/debugger/max_chars_per_second");
739 max_errors_per_second = GLOBAL_GET("network/limits/debugger/max_errors_per_second");
740 max_warnings_per_second = GLOBAL_GET("network/limits/debugger/max_warnings_per_second");
741
742 // Performance Profiler
743 Object *perf = Engine::get_singleton()->get_singleton_object("Performance");
744 if (perf) {
745 performance_profiler.instantiate(perf);
746 performance_profiler->bind("performance");
747 profiler_enable("performance", true);
748 }
749
750 // Core and profiler captures.
751 Capture core_cap(this,
752 [](void *p_user, const String &p_cmd, const Array &p_data, bool &r_captured) {
753 return static_cast<RemoteDebugger *>(p_user)->_core_capture(p_cmd, p_data, r_captured);
754 });
755 register_message_capture("core", core_cap);
756 Capture profiler_cap(this,
757 [](void *p_user, const String &p_cmd, const Array &p_data, bool &r_captured) {
758 return static_cast<RemoteDebugger *>(p_user)->_profiler_capture(p_cmd, p_data, r_captured);
759 });
760 register_message_capture("profiler", profiler_cap);
761
762 // Error handlers
763 phl.printfunc = _print_handler;
764 phl.userdata = this;
765 add_print_handler(&phl);
766
767 eh.errfunc = _err_handler;
768 eh.userdata = this;
769 add_error_handler(&eh);
770
771 messages.insert(Thread::get_main_id(), List<Message>());
772}
773
774RemoteDebugger::~RemoteDebugger() {
775 remove_print_handler(&phl);

Callers

nothing calls this directly

Calls 8

add_print_handlerFunction · 0.85
add_error_handlerFunction · 0.85
_core_captureMethod · 0.80
_profiler_captureMethod · 0.80
get_singleton_objectMethod · 0.45
instantiateMethod · 0.45
bindMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected