Improve VS Code project launch tasks file for better debugging
This commit is contained in:
@@ -287,7 +287,6 @@ namespace Flax.Build.Projects.VisualStudioCode
|
|||||||
switch (Platform.BuildPlatform.Target)
|
switch (Platform.BuildPlatform.Target)
|
||||||
{
|
{
|
||||||
case TargetPlatform.Windows:
|
case TargetPlatform.Windows:
|
||||||
{
|
|
||||||
if (configuration.Platform == TargetPlatform.Windows && outputType != TargetOutputType.Executable && configuration.Name.StartsWith("Editor."))
|
if (configuration.Platform == TargetPlatform.Windows && outputType != TargetOutputType.Executable && configuration.Name.StartsWith("Editor."))
|
||||||
{
|
{
|
||||||
var editorFolder = configuration.Architecture == TargetArchitecture.x64 ? "Win64" : "Win32";
|
var editorFolder = configuration.Architecture == TargetArchitecture.x64 ? "Win64" : "Win32";
|
||||||
@@ -303,20 +302,58 @@ namespace Flax.Build.Projects.VisualStudioCode
|
|||||||
json.EndArray();
|
json.EndArray();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case TargetPlatform.Linux:
|
case TargetPlatform.Linux:
|
||||||
{
|
|
||||||
json.AddField("program", outputTargetFilePath);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
switch (configuration.Platform)
|
||||||
|
|
||||||
if (configuration.Platform == TargetPlatform.Windows)
|
|
||||||
{
|
{
|
||||||
|
case TargetPlatform.Windows:
|
||||||
json.AddField("stopAtEntry", false);
|
json.AddField("stopAtEntry", false);
|
||||||
json.AddField("externalConsole", true);
|
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();
|
json.EndObject();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user