Skip to content

Commit

Permalink
Allow 'type' to be customized for unit test debugging
Browse files Browse the repository at this point in the history
This checkin allows the unit test debugging options to set 'type'. This resolves #1586.
  • Loading branch information
gregg-miskelly committed Jul 25, 2017
1 parent 1ff45ec commit f9685ae
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
33 changes: 28 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,15 @@
"default": true
}
}
},
"type": {
"type": "string",
"enum": [
"coreclr",
"clr"
],
"description": "Type type of code to debug. Can be either 'coreclr' for .NET Core debugging, or 'clr' for Desktop .NET Framework. 'clr' only works on Windows as the Desktop framework is Windows-only.",
"default": "coreclr"
}
}
},
Expand Down Expand Up @@ -451,13 +460,11 @@
"razor"
]
},
"runtime": "node",
"runtimeArgs": [],
"variables": {
"pickProcess": "csharp.listProcess",
"pickRemoteProcess": "csharp.listRemoteProcess"
},
"program": "./out/src/coreclr-debug/proxy.js",
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"configurationAttributes": {
"launch": {
Expand Down Expand Up @@ -1367,7 +1374,16 @@
"request": "attach",
"processId": "${command:pickProcess}"
}
]
],
"windows": {
"program": "./.debugger/vsdbg-ui.exe"
},
"osx": {
"program": "./.debugger/vsdbg-ui"
},
"linux": {
"program": "./.debugger/vsdbg-ui"
}
},
{
"type": "clr",
Expand All @@ -1378,13 +1394,11 @@
"razor"
]
},
"runtime": "node",
"runtimeArgs": [],
"variables": {
"pickProcess": "csharp.listProcess",
"pickRemoteProcess": "csharp.listRemoteProcess"
},
"program": "./out/src/coreclr-debug/proxy.js",
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"configurationAttributes": {
"launch": {
Expand Down Expand Up @@ -2147,6 +2161,15 @@
}
}
}
},
"windows": {
"program": "./.debugger/vsdbg-ui.exe"
},
"osx": {
"program": "./.debugger/vsdbg-ui"
},
"linux": {
"program": "./.debugger/vsdbg-ui"
}
}
]
Expand Down
5 changes: 4 additions & 1 deletion src/features/dotnetTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ function createLaunchConfiguration(program: string, args: string, cwd: string, d
result = {};
}

if (!result.type) {
result.type = "coreclr";
}

// Now fill in the rest of the options
result.name = ".NET Test Launch";
result.type = "coreclr";
result.request = "launch";
result.debuggerEventsPipeName = debuggerEventsPipeName;
result.program = program;
Expand Down

0 comments on commit f9685ae

Please sign in to comment.