Skip to content

Commit

Permalink
Debugger.Launch not supported on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Mar 7, 2020
1 parent 5eb440f commit c2e9f29
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions src/Mobile.BuildTools/Tasks/BuildToolsTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Mobile.BuildTools.Build;
Expand Down Expand Up @@ -58,23 +59,21 @@ public sealed override bool Execute()
try
{
//#if DEBUG
// if (!Debugger.IsAttached)
// if (!Debugger.IsAttached && !RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
// Debugger.Launch();
//#endif
ExecuteInternal(this);
}
catch (Exception ex)
{
#if DEBUG
if (!Debugger.IsAttached)
if (!Debugger.IsAttached && !RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Debugger.Launch();

Debugger.Break();
#endif
Log.LogError($"Unhandled error while executing {GetType().Name}");
Log.LogErrorFromException(ex);

if(ConfigHelper.Exists(ConfigurationPath)
if(ConfigHelper.Exists(ConfigurationPath)
&& ConfigHelper.GetConfig(ConfigurationPath).Debug)
{
Log.LogWarning("******** DEBUG OUTPUT ****************");
Expand Down
1 change: 0 additions & 1 deletion src/Mobile.BuildTools/Tasks/ImageResizerTask.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Linq;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Mobile.BuildTools.Build;
using Mobile.BuildTools.Generators.Images;
using Mobile.BuildTools.Models.AppIcons;
Expand Down
8 changes: 4 additions & 4 deletions src/Mobile.BuildTools/Tasks/ScssProcessorTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ internal ILog Logger
public override bool Execute()
{
try
{
{
//#if DEBUG
// if (!Debugger.IsAttached)
// Debugger.Launch();
// if (!Debugger.IsAttached && !RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
// Debugger.Launch();
//#endif


EnsureRuntimeExists();
var filesToProcess = ScssFiles.Where(scss => Path.GetFileName(scss)[0] != '_' && Path.GetExtension(scss) == ".scss" || Path.GetExtension(scss) == ".sass");
_generatedCssFiles = ProcessFiles(filesToProcess);
Expand Down

0 comments on commit c2e9f29

Please sign in to comment.