diff --git a/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs b/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs index 126f1027d..9eb32585c 100644 --- a/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs +++ b/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs @@ -287,7 +287,6 @@ namespace Flax.Build.Projects.VisualStudioCode switch (Platform.BuildPlatform.Target) { case TargetPlatform.Windows: - { if (configuration.Platform == TargetPlatform.Windows && outputType != TargetOutputType.Executable && configuration.Name.StartsWith("Editor.")) { var editorFolder = configuration.Architecture == TargetArchitecture.x64 ? "Win64" : "Win32"; @@ -303,20 +302,58 @@ namespace Flax.Build.Projects.VisualStudioCode json.EndArray(); } break; - } case TargetPlatform.Linux: - { json.AddField("program", outputTargetFilePath); + if (configuration.Platform == TargetPlatform.Linux) + { + json.AddField("MIMode", "gdb"); + json.BeginArray("setupCommands"); + { + json.BeginObject(); + json.AddField("description", "Enable pretty-printing for gdb"); + json.AddField("text", "-enable-pretty-printing"); + json.AddField("ignoreFailures", true); + json.EndObject(); + + // Ignore signals used by Mono + json.BeginObject(); + json.AddField("description", "ignore SIG35 signal"); + json.AddField("text", "handle SIG35 nostop noprint pass"); + json.EndObject(); + json.BeginObject(); + json.AddField("description", "ignore SIG36 signal"); + json.AddField("text", "handle SIG36 nostop noprint pass"); + json.EndObject(); + json.BeginObject(); + json.AddField("description", "ignore SIG357 signal"); + json.AddField("text", "handle SIG37 nostop noprint pass"); + json.EndObject(); + } + json.EndArray(); + json.BeginArray("args"); + { + json.AddUnnamedField("--std"); + if (outputType != TargetOutputType.Executable && configuration.Name.StartsWith("Editor.")) + { + json.AddUnnamedField("--project"); + json.AddUnnamedField(buildToolWorkspace); + json.AddUnnamedField("--skipCompile"); + } + } + json.EndArray(); + } break; } - } - - if (configuration.Platform == TargetPlatform.Windows) + switch (configuration.Platform) { + case TargetPlatform.Windows: json.AddField("stopAtEntry", false); json.AddField("externalConsole", true); - json.AddField("visualizerFile", Path.Combine(Globals.EngineRoot, "Source", "flax.natvis")); + break; + case TargetPlatform.Linux: + break; } + json.AddField("visualizerFile", Path.Combine(Globals.EngineRoot, "Source", "flax.natvis")); } json.EndObject(); }