Skip to content

Commit a624d6f

Browse files
committed
PR feedback
Update changelog Fix activation logic to handle windows arm64 (and cleanup older logic).
1 parent e50ea7f commit a624d6f

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* Update OmniSharp version to 1.37.13
1717
* Update Roslyn to 4.0.0-2.21354.7 (PR: [omnisharp-roslyn#2189](https://github.com/OmniSharp/omnisharp-roslyn/pull/2189))
1818
* Update included Build Tools to match .NET SDK 6 Preview 6 (PR: [omnisharp-roslyn#2187](https://github.com/OmniSharp/omnisharp-roslyn/pull/2187))
19+
* Debugger changes:
20+
* Added support for win10-arm64 debugging (PR: [#4672](https://github.com/OmniSharp/omnisharp-vscode/pull/4672))
1921

2022
## 1.23.13 (July 13th, 2021)
2123
* Fixes Razor editing support (PR: [#4642](https://github.com/OmniSharp/omnisharp-vscode/pull/4642))

src/coreclr-debug/activate.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export async function activate(thisExtension: vscode.Extension<CSharpExtensionEx
2121
_debugUtil = new CoreClrDebugUtil(context.extensionPath);
2222

2323
if (!CoreClrDebugUtil.existsSync(_debugUtil.debugAdapterDir())) {
24-
let isInvalidArchitecture: boolean = await checkForInvalidArchitecture(platformInformation, eventStream);
25-
if (!isInvalidArchitecture) {
24+
let isValidArchitecture: boolean = await checkForInvalidArchitecture(platformInformation, eventStream);
25+
if (!isValidArchitecture) {
2626
eventStream.post(new DebuggerPrerequisiteFailure("[ERROR]: C# Extension failed to install the debugger package."));
2727
showInstallErrorMessage(eventStream);
2828
}
@@ -37,27 +37,32 @@ export async function activate(thisExtension: vscode.Extension<CSharpExtensionEx
3737
context.subscriptions.push(vscode.debug.registerDebugAdapterDescriptorFactory('clr', factory));
3838
}
3939

40-
async function checkForInvalidArchitecture(platformInformation: PlatformInformation, eventStream: EventStream): Promise<boolean> {
40+
async function isValidArchitecture(platformInformation: PlatformInformation, eventStream: EventStream): Promise<boolean> {
4141
if (platformInformation) {
4242
if (platformInformation.isMacOS()) {
4343
if (platformInformation.architecture === "arm64") {
4444
eventStream.post(new DebuggerPrerequisiteWarning(`[WARNING]: arm64 macOS is not officially supported by the .NET Core debugger. You may experience unexpected issues when running in this configuration.`));
45-
return false;
45+
return true;
4646
}
4747

4848
// Validate we are on compatiable macOS version if we are x86_64
4949
if ((platformInformation.architecture !== "x86_64") ||
5050
(platformInformation.architecture === "x86_64" && !CoreClrDebugUtil.isMacOSSupported())) {
5151
eventStream.post(new DebuggerPrerequisiteFailure("[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer."));
52-
return true;
52+
return false;
5353
}
54+
55+
return true;
5456
}
55-
else if (platformInformation.architecture !== "x86_64") {
56-
if (platformInformation.isWindows() && platformInformation.architecture === "x86") {
57+
else if (platformInformation.isWindows()) {
58+
if (platformInformation.architecture === "x86") {
5759
eventStream.post(new DebuggerPrerequisiteWarning(`[WARNING]: x86 Windows is not currently supported by the .NET Core debugger. Debugging will not be available.`));
58-
} else {
59-
eventStream.post(new DebuggerPrerequisiteWarning(`[WARNING]: Processor architecture '${platformInformation.architecture}' is not currently supported by the .NET Core debugger. Debugging will not be available.`));
60+
return false;
6061
}
62+
63+
return true;
64+
}
65+
else {
6166
return true;
6267
}
6368
}

0 commit comments

Comments
 (0)