From f9685ae258d289ed0e2fda36c4c5ffea7e92a5d1 Mon Sep 17 00:00:00 2001 From: Gregg Miskelly Date: Tue, 25 Jul 2017 10:48:50 -0700 Subject: [PATCH] Allow 'type' to be customized for unit test debugging This checkin allows the unit test debugging options to set 'type'. This resolves #1586. --- package.json | 33 ++++++++++++++++++++++++++++----- src/features/dotnetTest.ts | 5 ++++- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 430ae22049..f93e3254b9 100644 --- a/package.json +++ b/package.json @@ -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" } } }, @@ -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": { @@ -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", @@ -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": { @@ -2147,6 +2161,15 @@ } } } + }, + "windows": { + "program": "./.debugger/vsdbg-ui.exe" + }, + "osx": { + "program": "./.debugger/vsdbg-ui" + }, + "linux": { + "program": "./.debugger/vsdbg-ui" } } ] diff --git a/src/features/dotnetTest.ts b/src/features/dotnetTest.ts index e56ca7826a..272b52db30 100644 --- a/src/features/dotnetTest.ts +++ b/src/features/dotnetTest.ts @@ -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;