-
Copy the remote debugging program to the target computer
The remote debugger is under the VS installation folder
Remote Debugger
. The path for vs2022 as an example isC:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE
-
Run the remote debugger on the target computer
Start the program in the
x64
orx86
folder depending on the type of program.
Configurator: Tools\Options, no authentication, check Allow any user to debug.
-
Add configuration in vs on the development computer
Modify the Properties\launchSettings.json file and add the following content:
1 2 3 4 5 6 7 8 9 10 11 12 13
"profiles": { "Windows Machine": { "commandName": "MsixPackage", "nativeDebugging": false }, // new profile "Remote Profile": { "commandName": "MsixPackage", "remoteDebugEnabled": true, "remoteDebugMachine": "192.168.1.168", // remote client "authenticationMode": "None" } }
-
Select startup options in vs
Select the remote startup option on the toolbar.
Reference:https://github.com/ligf/Examples/blob/master/MauiAppExample/Properties/launchSettings.json