Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing arm64 macOS to debug dotnet projects #4288

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@
"darwin"
],
"architectures": [
"x86_64"
"x86_64",
"arm64"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arthurlockman @gregg-miskelly do you have some context why -x64.zip is installed for arm64?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to debug x64 processes on an M1

],
"binaries": [
"./vsdbg-ui",
Expand Down
3 changes: 3 additions & 0 deletions src/coreclr-debug/activate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ async function checkForInvalidArchitecture(platformInformation: PlatformInformat
else if (platformInformation.architecture !== "x86_64") {
if (platformInformation.isWindows() && platformInformation.architecture === "x86") {
eventStream.post(new DebuggerPrerequisiteWarning(`[WARNING]: x86 Windows is not currently supported by the .NET Core debugger. Debugging will not be available.`));
} else if (platformInformation.isMacOS() && platformInformation.architecture === "arm64") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't enough - the debugger will still not download. You can likely address that by adding the following to package.json:

    {
      "id": "Debugger",
      "description": ".NET Core Debugger (macOS / x64)",
      "url": "https://download.visualstudio.microsoft.com/download/pr/6f481c2a-74a8-41cc-a115-f2d059242062/96e3d82b95ff1375347fedf0f5c7d4e7/coreclr-debug-osx-x64.zip",
      "fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-8/coreclr-debug-osx-x64.zip",
      "installPath": ".debugger",
      "platforms": [
        "darwin"
      ],
      // Line 275 of package.json -- Add 'arm64'
      "architectures": [
        "x86_64",
        "arm64"
      ],
      "binaries": [
        "./vsdbg-ui",
        "./vsdbg"
      ],
      "installTestPath": "./.debugger/vsdbg-ui",
      "integrity": "6BAA9A20DAA71018B9912A3E2A48C52A273ADC2E70F7101C12F688F397AD16D8"
    },

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, fixed that.

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.`));
return false;
} else {
eventStream.post(new DebuggerPrerequisiteWarning(`[WARNING]: Processor architecture '${platformInformation.architecture}' is not currently supported by the .NET Core debugger. Debugging will not be available.`));
}
Expand Down