On local dev machine:
Set breakpoints and reproduce the problem on remote machine. Visual Studio should hit breakpoints and allow stepping, variable inspection, and call stack navigation.
Common default port: shown in msvsmon UI (no single fixed TCP port; msvsmon may negotiate ports).
The debugger can run in two contexts:
If the target machine has no internet access, copy the Remote Debugger folder from your local VS 2022 installation: visual studio 2022 remote debugger