-
Notifications
You must be signed in to change notification settings - Fork 727
Remote Debugging On Linux Arm
This is a beta release feature
The extension supports remote debugging to linux-arm and requires netcoreapp 2.1. The extension has been tested against Raspbian 8 and 9.
If you run into any problems, please file an issue and note in the text that this is related to linux-arm.
Choose one of the following deployment methods:
-
Framework Dependent Deployment: Compile the application locally. Deploy the binary to
linux-arm. Requires the .NET Core Runtime to be installed onlinux-arm. -
Self Contained Deployment: Compile and publish the application locally. Deploy the standalone application to
linux-arm.
- Install a daily build of dotnet SDK 2.2.0 beta locally.
- Ensure that .NET Command Line Tools v2.2 or higher is installed
-
Run
dotnet --infoto verify.Example:
$ dotnet --info .NET Command Line Tools (2.2.0-preview1-007582) Product Information: Version: 2.2.0-preview1-007582 ...
-
Run the following command on linux-arm (installs to ~/vsdbg):
curl -sSL https://aka.ms/getvsdbgshbeta | bash /dev/stdin -r linux-arm -v latest -l ~/vsdbg
-
Install on
linux-arma daily build of .NET Core Runtime v2.1 preview.Example (installs to ~/dotnet):
mkdir ~/dotnet & curl -sSL https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-linux-arm.tar.gz | tar xvzf /dev/stdin -C ~/dotnet
- Run
dotnet new console -n MyConsoleApp. This will create a new netcoreapp v2.1 console application calledMyConsoleApp.-
The NuGet package restoral may fail to get the necessary packages. To download the NuGet packages that match the daily build, you can choose either option below:
- Create a
nuget.configfile with the following block:
<configuration> <packageSources> <add key="dotnet-myget" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> </packageSources> </configuration>
- Run
dotnet restore --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json.
- Create a
-
The NuGet package restoral may fail to get the necessary packages. To download the NuGet packages that match the daily build, you can choose either option below:
- In your application's root folder, run
dotnet build - Copy all the files under
bin/Debug/netcoreapp2.1/to yourlinux-armdevice.- To test run your application, on
linux-arm, run the entrypoint.dllwithdotnet.$ ~/dotnet/dotnet MyConsoleApp.dll
- To test run your application, on
Reference the sample launch.json below.
- The
"program"field is set to thedotnetexecutable and the first"args"item is the application.dllrelative to the current working directory ("cwd") onlinux-arm. - Update the fields under
"pipeArgs"to include the IP address of thelinux-armdevice and the ssh keyfile. - The
"debuggerPath"points to the location where you installed the debugger to onlinux-arm.
{
"name": ".NET Core Remote Launch - Framework Dependent (console)",
"type": "coreclr",
"request": "launch",
"program": "~/dotnet/dotnet",
"args": [
"./MyConsoleApp.dll"
],
"cwd": "~/MyConsoleApp",
"stopAtEntry": false,
"console": "internalConsole",
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "/usr/bin/ssh",
"pipeArgs": [
"-i", "mysshkeyfile",
"[email protected]"
],
"debuggerPath": "~/vsdbg/vsdbg"
}
}- Run
dotnet new console -n MyConsoleApp. This will create a new netcoreapp v2.1 console application calledMyConsoleApp.-
The NuGet package restoral may fail to get the necessary packages. To download the NuGet packages that match the daily build, you can choose either option below:
- Create a
nuget.configfile with the following block:
<configuration> <packageSources> <add key="dotnet-myget" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> </packageSources> </configuration>
- Run
dotnet restore --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json.
- Create a
-
The NuGet package restoral may fail to get the necessary packages. To download the NuGet packages that match the daily build, you can choose either option below:
- Run
dotnet publish -r linux-arm - Copy all the files under
bin/Debug/netcoreapp2.1/linux-arm/publish/tolinux-arm. - Test your application by running the standalone executable
$ ./MyConsoleApp
Reference the sample launch.json below.
- The
"program"field is the standalone executable relative to the current working directory ("cwd") onlinux-arm. - Update the fields under
"pipeArgs"to include the IP address of thelinux-armdevice and the ssh keyfile. - The
"debuggerPath"points to the location where you installed the debugger to onlinux-arm.
{
"name": ".NET Core Remote Launch - Standalone Application (console)",
"type": "coreclr",
"request": "launch",
"program": "MyConsoleApp",
"args": [],
"cwd": "~/MyConsoleApp",
"stopAtEntry": false,
"console": "internalConsole",
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "/usr/bin/ssh",
"pipeArgs": [
"-i", "mysshkeyfile",
"[email protected]"
],
"debuggerPath": "~/vsdbg/vsdbg"
}
}Documentation
- Change Log
- Main repo documentation.
- Branches and Releases
- Installing Pre-Releases
- Installing without internet connectivity
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
Developer Guide