-
Notifications
You must be signed in to change notification settings - Fork 677
Debugging x64 processes on an arm64 computer
Gregg Miskelly edited this page Jul 11, 2024
·
3 revisions
On both ARM64 Windows and ARM64 macOS, it is possible to run .NET code in an x64 process. This page provides instructions on how to do so.
- Install the ARM64 version of the .NET SDK so that the Language Service can be fully functional
- Obtain an x64 version of the .NET Runtime for the target process to run on top of. This can either be installed as the shared framework (see downloads), or you could change build tasks to publish the target app as a self-contained application (see documentation).
- Install the C# Extension, and optionally, the C# Dev Kit
- Open a folder containing code you would like to debug.
- If you don't already have a launch.json, generate one by opening the VS Code command pallet (press F1) and run ".NET: Generate Assets for Build and Debug"
- Open your .vscode/launch.json file
- You should see the path to your project's dll file in
program
. Move that to the first element of the args array. Change program to be the path to the x64 dotnet executable (example: /usr/local/share/dotnet/x64/dotnet). If your project is hosted in some sort of other executable, you could also use that. - Add
"targetArchitecture": "x86_64"
Example launch.json configuration:
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"cwd": "${workspaceFolder}",
"program": "/usr/local/share/dotnet/x64/dotnet",
"args": "${workspaceFolder}/bin/Debug/net8.0/ExampleProject.dll",
"targetArchitecture": "x86_64"
}
Configuration
- Configuring Snap installs of dotnet-sdk
- Configuring Arch Linux for Unity development
- Configuring Arch Linux for Razor development
- Installing the .NET Core Debugger on Arch Linux
Debugger
- Overview
- launch.json Help
- Feature List
- Enable Logging
- Portable PDBs
- Troubleshoot Breakpoints
- Attaching to remote processes
- Remote Debugging On Linux-Arm
- Windows Subsystem for Linux
- Diagnosting 'Debug adapter process has terminated unexpectedly'
- Testing libicu compatibility on Linux
- Debugging into the .NET Runtime itself
- Debugging x64 processes on an arm64 computer
Documentation
- Change Log
- Branches and Releases
- Installing Beta Releases
- Installing without internet connectivity
- Linux Support
- Run/Debug Unit Tests
- Troubleshooting: 'The .NET Core SDK cannot be located.' errors
Developer Guide