From 7c7bada586f0d6511852be8d478099175d889e8e Mon Sep 17 00:00:00 2001 From: Thays Grazia Date: Wed, 20 Dec 2023 18:03:50 -0300 Subject: [PATCH] Support debug apps running under mono runtime using vsdbg (#6752) * Implement support to debug when running on mono runtime using vsdbg * Fix merge * Adding changes to debug using mono runtime * Using monovsdbg to debug mono using icordbg * Addressing Gregg's and Andrew's comments * Addressing comments * Remove unrelated changes * Removing unnecessary information about debug using icordbg for mono, the launch.json will be created by another extension. * Remove unnecessary changes. * remove extra enter --- package.json | 12 +++++++++++- src/coreclrDebug/activate.ts | 7 +++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 27dd064ec..874c2fc52 100644 --- a/package.json +++ b/package.json @@ -1021,6 +1021,7 @@ "onDebugResolve:blazorwasm", "onDebugResolve:coreclr", "onDebugResolve:clr", + "onDebugResolve:monovsdbg", "onDebugResolve:dotnet", "onLanguage:csharp", "onCommand:o.showOutput", @@ -1642,7 +1643,8 @@ "type": "string", "enum": [ "coreclr", - "clr" + "clr", + "monovsdbg" ], "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" @@ -4875,6 +4877,14 @@ } } ] + }, + { + "type": "monovsdbg", + "label": ".NET Core using Mono Runtime", + "hiddenWhen": "true", + "languages": [ + "csharp" + ] } ], "semanticTokenTypes": [ diff --git a/src/coreclrDebug/activate.ts b/src/coreclrDebug/activate.ts index 1bffd2924..52e2f466b 100644 --- a/src/coreclrDebug/activate.ts +++ b/src/coreclrDebug/activate.ts @@ -92,8 +92,15 @@ export async function activate( new BaseVsDbgConfigurationProvider(platformInformation, csharpOutputChannel) ) ); + context.subscriptions.push( + vscode.debug.registerDebugConfigurationProvider( + 'monovsdbg', + new BaseVsDbgConfigurationProvider(platformInformation, csharpOutputChannel) + ) + ); disposables.add(vscode.debug.registerDebugAdapterDescriptorFactory('coreclr', factory)); disposables.add(vscode.debug.registerDebugAdapterDescriptorFactory('clr', factory)); + disposables.add(vscode.debug.registerDebugAdapterDescriptorFactory('monovsdbg', factory)); context.subscriptions.push(disposables); }