Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote debugging .net core 2.0 console app over ssh

I am building a .net core 2.0 console app on windows 10 but I want to debug it on a remote linux server running debian 9.

I found this article:

https://blogs.msdn.microsoft.com/devops/2017/01/26/debugging-net-core-on-unix-over-ssh/

but where I get stuck is selecting the SSH connection. My remote server has authentication and if I enter the user@ip:port it doesn't find anything.

enter image description here

I found some mention of using SSH tunnelling but as there is no dotnet process listening on the server (it's installed but it doesn't have any listening service running I can see) I am unsure exactly what port I'm meant to be tunnelling or even which direction to tunnel it.

What do I need to do to get my SSH connection visible in the debugger?

like image 509
Guerrilla Avatar asked Dec 14 '17 18:12

Guerrilla


1 Answers

I just tried this and I found that the Find.. button doesn't do anything either.

First you enable SSH connections in your Linux host (in my case, Ubuntu, I had to run sudo ufw allow ssh). Test things out by opening cmd on Windows and doing ssh user@host.

Then, on Visual Studio, in the SSH attach to process window, make sure you hit "refresh" and check the "show processes from all users" box. You should see the "dotnet" process running.

enter image description here

enter image description here

EDIT: you should be prompted for the remote host's password at some point. Here's the dialog shown when I changed the password on the remote host and then attempted to debug.

enter image description here

like image 106
Maria Ines Parnisari Avatar answered Sep 25 '22 07:09

Maria Ines Parnisari