Skip to content

Commit e58847c

Browse files
committed
fix(app-launch): Make IsDebug optional and default to false instead of required
1 parent 354bba8 commit e58847c

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/Uno.Sdk/targets/Uno.AppLaunch.targets

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
{
5757
[Required] public string Port { get; set; } = string.Empty;
5858
[Required] public string TargetPath { get; set; } = string.Empty;
59-
[Required] public string IsDebug { get; set; } = string.Empty;
59+
public string IsDebug { get; set; } = string.Empty;
6060
public string Ide { get; set; } = string.Empty;
6161
public string Plugin { get; set; } = string.Empty;
6262
@@ -89,17 +89,13 @@
8989
Add("ide", Ide);
9090
Add("plugin", Plugin);
9191
92-
// Normalize IsDebug to "true"/"false" if it's a recognizable bool; otherwise pass as-is.
93-
if (string.IsNullOrEmpty(IsDebug))
92+
// IsDebug is optional: treat empty/null as "false"
93+
var isDebugValue = false;
94+
if (!string.IsNullOrEmpty(IsDebug) && bool.TryParse(IsDebug, out var parsed))
9495
{
95-
Log.LogError("IsDebug is required.");
96-
return Success = false;
96+
isDebugValue = parsed;
9797
}
98-
99-
if (bool.TryParse(IsDebug, out var b))
100-
Add("isDebug", b ? "true" : "false");
101-
else
102-
Add("isDebug", IsDebug);
98+
Add("isDebug", isDebugValue ? "true" : "false");
10399
104100
var qs = parts.Count > 0 ? "?" + string.Join("&", parts) : string.Empty;
105101
var url = $"http://localhost:{portNum}/applaunch/asm/{encodedPath}{qs}";

0 commit comments

Comments
 (0)