diff --git a/src/SmallSharp/MonitorActiveDocument.cs b/src/SmallSharp/MonitorActiveDocument.cs index 51c63ed..9572a7e 100644 --- a/src/SmallSharp/MonitorActiveDocument.cs +++ b/src/SmallSharp/MonitorActiveDocument.cs @@ -18,8 +18,15 @@ public class MonitorActiveDocument : Task [Required] public ITaskItem[] StartupFiles { get; set; } = Array.Empty(); + public string? Debugger { get; set; } + public override bool Execute() { + if (bool.TryParse(Debugger, out var debugger) && debugger) + { + System.Diagnostics.Debugger.Launch(); + } + if (string.IsNullOrEmpty(LaunchProfiles) || string.IsNullOrEmpty(UserFile)) { diff --git a/src/SmallSharp/SmallSharp.targets b/src/SmallSharp/SmallSharp.targets index 55afc25..cdc7ac4 100644 --- a/src/SmallSharp/SmallSharp.targets +++ b/src/SmallSharp/SmallSharp.targets @@ -30,7 +30,8 @@ + StartupFiles="@(StartupFile)" + Debugger="$(DebugSmallSharp)"/>