Skip to content

Commit

Permalink
Support debug apps running under mono runtime using vsdbg (#6752)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
thaystg authored Dec 20, 2023
1 parent 0d7d1e4 commit 7c7bada
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@
"onDebugResolve:blazorwasm",
"onDebugResolve:coreclr",
"onDebugResolve:clr",
"onDebugResolve:monovsdbg",
"onDebugResolve:dotnet",
"onLanguage:csharp",
"onCommand:o.showOutput",
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -4875,6 +4877,14 @@
}
}
]
},
{
"type": "monovsdbg",
"label": ".NET Core using Mono Runtime",
"hiddenWhen": "true",
"languages": [
"csharp"
]
}
],
"semanticTokenTypes": [
Expand Down
7 changes: 7 additions & 0 deletions src/coreclrDebug/activate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7c7bada

Please sign in to comment.