diff --git a/Source/Editor/Windows/DebugLogWindow.cs b/Source/Editor/Windows/DebugLogWindow.cs
index 7900b55c2..ef47fe241 100644
--- a/Source/Editor/Windows/DebugLogWindow.cs
+++ b/Source/Editor/Windows/DebugLogWindow.cs
@@ -2,6 +2,8 @@
using System;
using System.Collections.Generic;
+using System.IO;
+using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
@@ -183,6 +185,11 @@ namespace FlaxEditor.Windows
return true;
}
}
+ // Enter
+ else if (key == KeyboardKeys.Return)
+ {
+ Open();
+ }
// Ctrl+C
else if (key == KeyboardKeys.C && Root.GetKey(KeyboardKeys.Control))
{
@@ -193,6 +200,17 @@ namespace FlaxEditor.Windows
return base.OnKeyDown(key);
}
+ ///
+ /// Opens the entry location.
+ ///
+ public void Open()
+ {
+ if (!string.IsNullOrEmpty(Desc.LocationFile) && File.Exists(Desc.LocationFile))
+ {
+ Editor.Instance.CodeEditing.OpenFile(Desc.LocationFile, Desc.LocationLine);
+ }
+ }
+
///
/// Copies the entry information to the system clipboard (as text).
///
@@ -203,9 +221,7 @@ namespace FlaxEditor.Windows
public override bool OnMouseDoubleClick(Vector2 location, MouseButton button)
{
- // Show the location
- Editor.Instance.CodeEditing.OpenFile(Desc.LocationFile, Desc.LocationLine);
-
+ Open();
return true;
}
@@ -238,6 +254,7 @@ namespace FlaxEditor.Windows
var menu = new ContextMenu();
menu.AddButton("Copy", Copy);
+ menu.AddButton("Open", Open).Enabled = !string.IsNullOrEmpty(Desc.LocationFile) && File.Exists(Desc.LocationFile);
menu.Show(this, location);
}
@@ -337,7 +354,6 @@ namespace FlaxEditor.Windows
Editor.Options.OptionsChanged += OnEditorOptionsChanged;
Debug.Logger.LogHandler.SendLog += LogHandlerOnSendLog;
Debug.Logger.LogHandler.SendExceptionLog += LogHandlerOnSendExceptionLog;
-
}
private void OnEditorOptionsChanged(EditorOptions options)
@@ -502,7 +518,7 @@ namespace FlaxEditor.Windows
}
fineStackTrace.AppendLine(match.Groups[0].Value);
}
- else if (match.Groups[1].Value.Trim().StartsWith("FlaxEngine.Debug.Info", StringComparison.Ordinal))
+ else if (match.Groups[1].Value.Trim().StartsWith("FlaxEngine.Debug.", StringComparison.Ordinal))
{
foundStart = true;
}
diff --git a/Source/Engine/Engine/DebugLogHandler.cs b/Source/Engine/Engine/DebugLogHandler.cs
index c1dc9f9dd..986d48a3a 100644
--- a/Source/Engine/Engine/DebugLogHandler.cs
+++ b/Source/Engine/Engine/DebugLogHandler.cs
@@ -36,13 +36,14 @@ namespace FlaxEngine
///
public void Log(LogType logType, Object context, string message)
{
-#if DEBUG
- string stackTrace = Environment.StackTrace;
+ if (message == null)
+ return;
+#if BUILD_RELEASE
+ string stackTrace = null;
#else
- string stackTrace = string.Empty;
+ string stackTrace = Environment.StackTrace;
#endif
Internal_Log(logType, message, Object.GetUnmanagedPtr(context), stackTrace);
-
SendLog?.Invoke(logType, message, context, stackTrace);
}
diff --git a/Source/Engine/Scripting/Scripting.cs b/Source/Engine/Scripting/Scripting.cs
index 522d0a73c..6cb04b813 100644
--- a/Source/Engine/Scripting/Scripting.cs
+++ b/Source/Engine/Scripting/Scripting.cs
@@ -148,9 +148,11 @@ namespace FlaxEngine
///
internal static void Init()
{
-#if DEBUG
+#if BUILD_DEBUG
Debug.Logger.LogHandler.LogWrite(LogType.Info, "Using FlaxAPI in Debug");
-#else
+#elif BUILD_DEVELOPMENT
+ Debug.Logger.LogHandler.LogWrite(LogType.Info, "Using FlaxAPI in Development");
+#elif BUILD_RELEASE
Debug.Logger.LogHandler.LogWrite(LogType.Info, "Using FlaxAPI in Release");
#endif