diff --git a/src/session.cpp b/src/session.cpp index ffc7775..9b3b8ad 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -30,6 +30,7 @@ #include #include #include +#include namespace { @@ -410,7 +411,9 @@ class Impl : public dap::Session { // "body" is an optional field for some events, such as "Terminated Event". bool body_ok = true; d->field("body", [&](dap::Deserializer* d) { - if (!typeinfo->deserialize(d, data)) { + // todo: to completed event list + std::set bodyCanBeEmpty { "terminated" }; + if (!typeinfo->deserialize(d, data) && bodyCanBeEmpty.find(event) == bodyCanBeEmpty.end()) { body_ok = false; } return true;