Add output type to DAP output events

This commit is contained in:
Ricardo Subtil 2024-03-14 10:53:30 +00:00
parent f2045ba822
commit b6d1204186
5 changed files with 12 additions and 11 deletions

View file

@ -600,12 +600,12 @@ Dictionary DebugAdapterParser::ev_continued() const {
return event;
}
Dictionary DebugAdapterParser::ev_output(const String &p_message) const {
Dictionary DebugAdapterParser::ev_output(const String &p_message, RemoteDebugger::MessageType p_type) const {
Dictionary event = prepare_base_event(), body;
event["event"] = "output";
event["body"] = body;
body["category"] = "stdout";
body["category"] = (p_type == RemoteDebugger::MessageType::MESSAGE_TYPE_ERROR) ? "stderr" : "stdout";
body["output"] = p_message + "\r\n";
return event;