| 719 | } |
| 720 | |
| 721 | Error RemoteDebugger::_profiler_capture(const String &p_cmd, const Array &p_data, bool &r_captured) { |
| 722 | r_captured = false; |
| 723 | ERR_FAIL_COND_V(p_data.is_empty(), ERR_INVALID_DATA); |
| 724 | ERR_FAIL_COND_V(p_data[0].get_type() != Variant::BOOL, ERR_INVALID_DATA); |
| 725 | ERR_FAIL_COND_V(!has_profiler(p_cmd), ERR_UNAVAILABLE); |
| 726 | Array opts; |
| 727 | if (p_data.size() > 1) { // Optional profiler parameters. |
| 728 | ERR_FAIL_COND_V(p_data[1].get_type() != Variant::ARRAY, ERR_INVALID_DATA); |
| 729 | opts = p_data[1]; |
| 730 | } |
| 731 | r_captured = true; |
| 732 | profiler_enable(p_cmd, p_data[0], opts); |
| 733 | return OK; |
| 734 | } |
| 735 | |
| 736 | RemoteDebugger::RemoteDebugger(Ref<RemoteDebuggerPeer> p_peer) { |
| 737 | peer = p_peer; |
no test coverage detected