Skip to content

Commit 62a5cb8

Browse files
committed
Добавлено управление флагом debug.wait для режима oscript.web
1 parent 9df5e8f commit 62a5cb8

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

src/VSCode.DebugAdapter/ServerProcess.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public ServerProcess(PathHandlingStrategy pathHandling) : base(pathHandling)
2626

2727
public IDictionary<string, string> Environment { get; set; } = new Dictionary<string, string>();
2828

29+
public bool WaitOnStart { get; set; }
30+
2931
protected override Process CreateProcess()
3032
{
3133
var dbgArgs = new List<string>();
@@ -34,7 +36,7 @@ protected override Process CreateProcess()
3436
dbgArgs.Add($"--debug.port={DebugPort}");
3537
}
3638
dbgArgs.Add("--debug.protocol=tcp");
37-
dbgArgs.Add("--debug.wait=1");
39+
dbgArgs.Add($"--debug.wait={(WaitOnStart ? "1" : "0")}");
3840

3941
var debugArguments = string.Join(" ", dbgArgs);
4042
var process = new Process();
@@ -104,6 +106,7 @@ protected override void InitInternal(JObject args)
104106
DebugPort = options.DebugPort;
105107
Environment = options.Env;
106108
DebugProtocol = "tcp";
109+
WaitOnStart = options.WaitOnStart;
107110
}
108111
}
109112
}

src/VSCode.DebugAdapter/WebLaunchOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ namespace VSCode.DebugAdapter
1010
public class WebLaunchOptions : CommonLaunchOptions
1111
{
1212
public string AppDir { get; set; }
13+
14+
public bool WaitOnStart { get; set; }
1315
}
1416
}

src/VSCode.DebugAdapter/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "oscript-debug",
33
"displayName": "OneScript Debug (BSL)",
4-
"version": "0.7.2",
4+
"version": "0.8.0",
55
"publisher": "EvilBeaver",
66
"description": "Visual Studio Code debugger extension for OneScript (BSL)",
77
"icon": "images/logo-dbg.png",
@@ -131,7 +131,8 @@
131131
"env": {},
132132
"runtimeExecutable": null,
133133
"runtimeArgs" : [],
134-
"debugPort": 2801
134+
"debugPort": 2801,
135+
"waitOnStart": false
135136
}
136137
],
137138
"configurationAttributes": {
@@ -166,6 +167,11 @@
166167
"type": "number",
167168
"description": "Порт для запуска отладчика. Одновременные сеансы отладки должны быть разделены по портам",
168169
"default": 2801
170+
},
171+
"waitOnStart": {
172+
"type": "boolean",
173+
"description": "Ожидать подключения отладчика при старте приложения (не выполнять bsl до его подключения)",
174+
"default": false
169175
}
170176
}
171177
},

0 commit comments

Comments
 (0)