4
votes

Is it possible to debug ASP.NET Core 3.0 application with Visual Studio 2019 on Raspberry PI 3?

I manage to install ASP.NET Core 3.0 and create Hello World application on Raspberry PI with dotnet new webapp.
Then I build ASP.NET Core 3.0 on Visual studio 2019 and deploy it to local folder, copy entire content to raspberry pi and run it. It works.

But I don't know how can I debug app from Visual Studio 2019. There is no remote debugging property, I can not select any arm CPU type nothing.

I can't even find any blog, post how to do it.

1
Did you read this? Remote DebuggingJeppe
Did and a bunch of others, but nothing I found includes all technologies (ASP.NET Core 3.0, Windows IOT, Raspberry PI 3 and Visual Studio 2019)Makla

1 Answers

2
votes

You can debug over SSH in Visual Studio.

So what you want to do is effectively this:

  1. Make your hello world app
  2. Set breakpoints in it where you want them
  3. Build the app in debug, self contained
  4. Deploy the app to your Rapberry Pi (it has to have SSH enabled on the Pi, running something like Raspbian)
  5. Attach your debugger from VS 2019 to the Pi over SSH.

I wrote an article about this exact topic with pictures and a powershell script here: https://medium.com/@lewwybogus/debugging-your-net-core-3-app-on-your-raspberry-pi-with-visual-studio-2019-9662348e79d9?source=friends_link&sk=33e0da85e07e45234a7804d5801110a1