Don't use MONO_ENV_OPTIONS to pass debug options by default

It causes issues when starting subprocesses.
Fixes https://github.com/microsoft/vscode-mono-debug/issues/68
This commit is contained in:
Alexander Köplinger 2020-10-09 20:14:28 +02:00
Родитель 12b636c6b9
Коммит 488eff1234
5 изменённых файлов: 24 добавлений и 6 удалений

Просмотреть файл

@ -1,3 +1,7 @@
## 0.16.2
* Don't use MONO_ENV_OPTIONS to pass debug options by default, it causes issues when starting subprocesses: [Issue #68](https://github.com/microsoft/vscode-mono-debug/issues/68)
## 0.16.1
* Support debugging VB source files (.vb)

2
package-lock.json сгенерированный
Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "mono-debug",
"version": "0.16.1",
"version": "0.16.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "mono-debug",
"displayName": "Mono Debug",
"version": "0.16.1",
"version": "0.16.2",
"publisher": "ms-vscode",
"description": "Visual Studio Code debugger extension for Mono",
"icon": "images/mono-debug-icon.png",
@ -179,6 +179,11 @@
},
"default": []
},
"passDebugOptionsViaEnvironmentVariable": {
"type": "boolean",
"description": "%mono.launch.passDebugOptionsViaEnvironmentVariable.description%",
"default": false
},
"env": {
"type": "object",
"description": "%mono.launch.env.description%",

Просмотреть файл

@ -21,6 +21,7 @@
"mono.launch.cwd.description": "Absolute path to the working directory of the program being debugged.",
"mono.launch.runtimeExecutable.description": "Absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.",
"mono.launch.runtimeArgs.description": "Optional arguments passed to the runtime executable.",
"mono.launch.passDebugOptionsViaEnvironmentVariable.description": "Use the MONO_ENV_OPTIONS environment variable to pass the Mono debugger options when launching a program. This is useful if you're embedding Mono in a custom executable.",
"mono.launch.env.description": "Environment variables passed to the program.",
"mono.launch.externalConsole.deprecationMessage": "Attribute 'externalConsole' is deprecated, use 'console' instead.",
"mono.launch.console.description": "Where to launch the debug target.",

Просмотреть файл

@ -259,10 +259,18 @@ namespace VSCodeDebug
bool debug = !getBool(args, "noDebug", false);
if (debug) {
if (!env.ContainsKey("MONO_ENV_OPTIONS"))
env["MONO_ENV_OPTIONS"] = $" --debug --debugger-agent=transport=dt_socket,server=y,address={host}:{port}";
else
env["MONO_ENV_OPTIONS"] = $" --debug --debugger-agent=transport=dt_socket,server=y,address={host}:{port} " + env["MONO_ENV_OPTIONS"];
bool passDebugOptionsViaEnvironmentVariable = getBool(args, "passDebugOptionsViaEnvironmentVariable", false);
if (passDebugOptionsViaEnvironmentVariable) {
if (!env.ContainsKey("MONO_ENV_OPTIONS"))
env["MONO_ENV_OPTIONS"] = $" --debug --debugger-agent=transport=dt_socket,server=y,address={host}:{port}";
else
env["MONO_ENV_OPTIONS"] = $" --debug --debugger-agent=transport=dt_socket,server=y,address={host}:{port} " + env["MONO_ENV_OPTIONS"];
}
else {
cmdLine.Add("--debug");
cmdLine.Add($"--debugger-agent=transport=dt_socket,server=y,address={host}:{port}");
}
}
if (env.Count == 0) {