Do not report invalid Source in JSON
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Fri, 4 May 2018 19:32:13 +0000 (22:32 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Thu, 10 May 2018 00:13:01 +0000 (09:13 +0900)
src/debug/netcoredbg/vscodeprotocol.cpp

index 4c08483..b15835b 100644 (file)
@@ -35,8 +35,9 @@ void to_json(json &j, const StackFrame &f) {
         {"column",    f.column},
         {"endLine",   f.endLine},
         {"endColumn", f.endColumn},
-        {"moduleId",  f.moduleId},
-        {"source",    f.source}};
+        {"moduleId",  f.moduleId}};
+    if (!f.source.IsNull())
+        j["source"] = f.source;
 }
 
 void to_json(json &j, const Thread &t) {