Pete
Pete

Reputation: 1867

Remote Debugging .Net Core 2.0 on Windows 10 IoT

I've written a Hello World console app in .Net Core 2.0 using VS 2017 and deployed the Debug build to a Raspberry Pi 3 running Windows 10 IoT. I can execute the app remotely via PowerShell and everything seems fine.

Having installed the Visual Studio 2017 Remote Debugging tools, I'm now trying to hook up the Remote Debugger so as I can step through my code on the Pi and I'm running into problems.

When I try to "Attach to process" from the Debug menu in Visual Studio and enter the IP and port number supplied by the IoT device portal I get the following error:

Unable to connect to the Microsoft Visual Studio Remote Debugger named '192.168.1.139:8116'. Connection request was rejected by the remote debugger. Ensure that the remote debugger is running in 'Windows Authentication' mode.

enter image description here

The following screenshot of the IoT Device Portal shows both the IP and Port for Remote Debug and the fact that my app (echo.exe) is running:

enter image description here

I've tried running the remote debugger both with and without the "Run as DefaultAccount" option checked, but this seems to make no difference.

I've also checked the firewall settings on my dev PC to ensure that it is not blocking traffic (I am connecting over the Private network)

enter image description here

Although the error message warns about Windows Authentication Mode, I can find no such setting for the remote debugger. Any help in getting the Remote Debugger attached and operational would be gratefully received.

Upvotes: 1

Views: 1305

Answers (2)

Rita Han
Rita Han

Reputation: 9700

You may need to select the connection type to "Remote" instead of "Default".

It works for me. You can have a try and feel free let me know if there is any problem.

Upvotes: 2

Mihail Stancescu
Mihail Stancescu

Reputation: 4138

One thing that I think it could help is when deploying the app to the Remote Machine and you are presented the ‘Remote Connections’ dialog you can choose there what type of authentication you want. One of the options is Windows Authentication. Try deploying and running the app like that and then the Remote Debugger should work.

In your VS Studio Project Properties -> Debug Tab -> Authentication Mode: Window Authentication

Upvotes: 0

Related Questions