1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-18 08:06:04 +02:00

Fixed some path error handling, fixed Debug Sessions

This commit is contained in:
Brian Fiete 2020-04-26 08:46:45 -07:00
parent 169e351a63
commit 595f35b42e
2 changed files with 17 additions and 9 deletions

View file

@ -1042,7 +1042,7 @@ namespace IDE
project.mNeedsTargetRebuild = true;
String targetDir = scope String();
Path.GetDirectoryPath(targetPath, targetDir);
Path.GetDirectoryPath(targetPath, targetDir).IgnoreError();
if (!targetDir.IsEmpty)
Directory.CreateDirectory(targetDir).IgnoreError();
}

View file

@ -1956,14 +1956,16 @@ namespace IDE
let workspaceOptions = GetCurWorkspaceOptions();
let options = GetCurProjectOptions(project);
if (!options.mDebugOptions.mCommand.IsWhiteSpace)
{
String execCmd = scope .();
ResolveConfigString(mPlatformName, workspaceOptions, project, options, options.mDebugOptions.mCommand, "command", execCmd);
String execCmd = scope .();
ResolveConfigString(mPlatformName, workspaceOptions, project, options, options.mDebugOptions.mCommand, "command", execCmd);
if (!execCmd.IsWhiteSpace)
{
String initialDir = scope .();
Path.GetDirectoryPath(execCmd, initialDir);
dialog.InitialDirectory = initialDir;
Path.GetDirectoryPath(execCmd, initialDir).IgnoreError();
if (!initialDir.IsWhiteSpace)
dialog.InitialDirectory = initialDir;
dialog.SetFilter("Debug Session (*.bfdbg)|*.bfdbg");
dialog.DefaultExt = ".bfdbg";
@ -9660,7 +9662,7 @@ namespace IDE
if (mWorkspace.mStartupProject != null)
{
if (mWorkspace.mStartupProject.IsEmpty)
if ((mWorkspace.mStartupProject.IsEmpty) && (!mWorkspace.IsDebugSession))
{
#if !CLI
DarkDialog dlg = new DarkDialog("Initialize Project?",
@ -10007,8 +10009,14 @@ namespace IDE
IDEUtils.FixFilePath(launchPath);
IDEUtils.FixFilePath(targetPath);
if (launchPath.IsEmpty)
{
OutputErrorLine("No debug target path was specified");
return false;
}
if (workingDir.IsEmpty)
Path.GetDirectoryPath(launchPath, workingDir);
Path.GetDirectoryPath(launchPath, workingDir).IgnoreError();
if (!Directory.Exists(workingDir))
{