So, I found an article that tells how to debug a UWP application on Surface Pro using a cable:
Essentially, the Visual Studio debugger wants to debug your application over the network, so you create a network between your desktop computer and your surface professional.
Below is a guide highlighting the main steps.
https://tomsoderling.imtqy.com/Wired-Debugging-on-Surface/
Necessary equipment
For debugging over a wired connection, you will need several things:
Connect the keys with the Ethernet cable and connect one key to the laptop and the other to the Surface.
Run the remote debugger program on your surface and configure the following:
No authentication
Disabling this seems to save you a lot of the hassle of trying to connect a debugger to a remote client application. I am debugging on a private or wired network, and the remote client only works when I need to debug, so the lack of security does not concern me here.
Allow any user to debug
I use this option because do not log into my Windows 10 virtual machine through Parallels, so I had a problem with this. I also use this when my colleague needs to debug on the surface.
And then your device should be found in Autodiscover in visual studio
source share