From 1b881f23414334bfa84c67db5f3f12465fb2d389 Mon Sep 17 00:00:00 2001 From: Keywan Ghadami Date: Sat, 26 Dec 2015 20:34:23 +0100 Subject: [PATCH] on updating source file on debuging check if file exists before opening in editor --- src/dlangide/ui/debuggerui.d | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dlangide/ui/debuggerui.d b/src/dlangide/ui/debuggerui.d index 884b5f4..0a6286c 100644 --- a/src/dlangide/ui/debuggerui.d +++ b/src/dlangide/ui/debuggerui.d @@ -82,7 +82,12 @@ class DebuggerUIHandler : DebuggerCallback, StackFrameSelectedHandler { if (sourceFile) { _ide.openSourceFile(sourceFile.filename, sourceFile, true); } else { - _ide.openSourceFile(location.fullFilePath, null, true); + import std.file; + if (exists(location.fullFilePath)) { + _ide.openSourceFile(location.fullFilePath, null, true); + } else { + Log.d("can not update location sourcefile does not exists:" ~ location.fullFilePath); + } } } DSourceEdit[] editors = _ide.allOpenedEditors;