File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 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
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}";
You can’t perform that action at this time.
0 commit comments