From 5d3a0422a2ce2fa650390d9b4673ee2bdf80520f Mon Sep 17 00:00:00 2001 From: Igor Kulaychuk Date: Fri, 4 May 2018 22:32:13 +0300 Subject: [PATCH] Do not report invalid Source in JSON --- src/debug/netcoredbg/vscodeprotocol.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/debug/netcoredbg/vscodeprotocol.cpp b/src/debug/netcoredbg/vscodeprotocol.cpp index 4c08483..b15835b 100644 --- a/src/debug/netcoredbg/vscodeprotocol.cpp +++ b/src/debug/netcoredbg/vscodeprotocol.cpp @@ -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) { -- 2.7.4