Skip to content

Commit 2b043f5

Browse files
authored
Update isMacOSSupported to Monterey (#7256)
* Update isMacOSSupported to Monterey
1 parent 1ff9c0f commit 2b043f5

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

l10n/bundle.l10n.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@
167167
"Unexpected message received from debugger.": "Unexpected message received from debugger.",
168168
"[ERROR]: C# Extension failed to install the debugger package.": "[ERROR]: C# Extension failed to install the debugger package.",
169169
"Could not find a process id to attach.": "Could not find a process id to attach.",
170-
"[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer.": "[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer.",
170+
"[ERROR] The debugger cannot be installed. The debugger is not supported on '{0}'": "[ERROR] The debugger cannot be installed. The debugger is not supported on '{0}'",
171+
"[ERROR] The debugger cannot be installed. The debugger requires macOS 12 (Monterey) or newer.": "[ERROR] The debugger cannot be installed. The debugger requires macOS 12 (Monterey) or newer.",
171172
"[WARNING]: x86 Windows is not supported by the .NET debugger. Debugging will not be available.": "[WARNING]: x86 Windows is not supported by the .NET debugger. Debugging will not be available.",
172173
"[ERROR] The debugger cannot be installed. Unknown platform.": "[ERROR] The debugger cannot be installed. Unknown platform.",
173174
"Failed to complete the installation of the C# extension. Please see the error in the output window below.": "Failed to complete the installation of the C# extension. Please see the error in the output window below.",

src/coreclrDebug/activate.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,23 @@ async function checkIsValidArchitecture(
111111
): Promise<boolean> {
112112
if (platformInformation) {
113113
if (platformInformation.isMacOS()) {
114-
if (platformInformation.architecture === 'arm64') {
115-
return true;
114+
if (platformInformation.architecture !== 'arm64' && platformInformation.architecture !== 'x86_64') {
115+
eventStream.post(
116+
new DebuggerPrerequisiteFailure(
117+
vscode.l10n.t(
118+
"[ERROR] The debugger cannot be installed. The debugger is not supported on '{0}'",
119+
platformInformation.architecture
120+
)
121+
)
122+
);
123+
return false;
116124
}
117125

118-
// Validate we are on compatiable macOS version if we are x86_64
119-
if (
120-
platformInformation.architecture !== 'x86_64' ||
121-
(platformInformation.architecture === 'x86_64' && !CoreClrDebugUtil.isMacOSSupported())
122-
) {
126+
if (!CoreClrDebugUtil.isMacOSSupported()) {
123127
eventStream.post(
124128
new DebuggerPrerequisiteFailure(
125129
vscode.l10n.t(
126-
'[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer.'
130+
'[ERROR] The debugger cannot be installed. The debugger requires macOS 12 (Monterey) or newer.'
127131
)
128132
)
129133
);

src/coreclrDebug/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ export class CoreClrDebugUtil {
8383
}
8484

8585
public static isMacOSSupported(): boolean {
86-
// .NET Core 2.0 requires macOS 10.12 (Sierra), which is Darwin 16.0+
86+
// .NET 8 requires macOS 12 (Monterey), which is Darwin 21.0+
8787
// Darwin version chart: https://en.wikipedia.org/wiki/Darwin_(operating_system)
88-
return semver.gte(os.release(), '16.0.0');
88+
return semver.gte(os.release(), '21.0.0');
8989
}
9090

9191
public static existsSync(path: string): boolean {

0 commit comments

Comments
 (0)