Remote debugging MAUI program

  1. 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

  2. Run the remote debugger on the target computer

    Start the program in the x64 or x86 folder depending on the type of program.
    Configurator: Tools\Options, no authentication, check Allow any user to debug.
    2a2102346c794b74905f88729237b259.png

  3. 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"
      }
    }
    
  4. Select startup options in vs

    Select the remote startup option on the toolbar.
    d2957b5667525df12e8eb3647cb42ea4.png

Reference:https://github.com/ligf/Examples/blob/master/MauiAppExample/Properties/launchSettings.json

Licensed under CC BY-NC-SA 4.0