简体   繁体   中英

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.

在此处输入图片说明

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:

在此处输入图片说明

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)

在此处输入图片说明

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM