param( [Parameter(Mandatory=$true)] [string]$RemoteComputer, [string]$RemotePath = "C:\MyApp", [string]$LocalDebuggerPath = "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Remote Debugger"

Security is a major consideration when opening debugging ports.

Save as Start-RemoteDebugging.ps1 :

Remote debugging allows Visual Studio 2022 (the "local" machine) to attach to a process running on a separate computer (the "remote" machine). It sends debugging commands over the network, allowing you to:

Create inbound rule for remote debugger: