Ploxc

WinCC Unified Debug Proxy
Guides

WinCC Setup

Before you can use the debug proxy, the WinCC Unified runtime must have its debugger enabled. This guide walks through the setup on a PC Station.

For a step-by-step guide with screenshots, see Debugging Scripts in WinCC Unified by DMC.

Script debugging is only available on WinCC Unified PC Runtime. Debugging on Unified Comfort Panels (such as TP, KP, or MTP series) is not supported - there is no debug endpoint exposed on panel hardware. If you need to troubleshoot scripts on a panel, the only options are logging via HMIRuntime.Trace() or testing in a PC Runtime simulation first.

Enable the debugger

Open SIMATIC Runtime Manager

On the WinCC PC Station, open the SIMATIC Runtime Manager application. You can find it in the Start menu or by searching for "Runtime Manager".

Enable the Script Debugger

In the SIMATIC Runtime Manager settings, enable the Script Debugger. Note the Screen Debugger port - the default is 9222.

After changing the debugger setting, the WinCC runtime must be restarted for the change to take effect.

Open the WinCC runtime in a browser

Open a browser on the WinCC machine and navigate to the runtime web interface:

https://<HOST>/webrh

Where <HOST> is the machine's hostname or IP address. Click on WinCC Unified RT and log in with a user that has HMI Administrator and Operator roles.

A browser with the WinCC runtime must be open for debug endpoints to be available. Without an active browser session, the runtime does not expose any CDP (Chrome DevTools Protocol) targets on port 9222 and the proxy will have nothing to connect to.

Open only one screen

Navigate to the screen you want to debug.

Keep only one screen open at a time. Each screen creates its own debug session with separate Dynamics and Events targets. Multiple open screens lead to multiple targets, which makes it difficult to debug the correct session. If you do have multiple screens open, the proxy selects the most recent session, which may not be the screen you intend to debug.

Verify the debug endpoint

Open http://localhost:9222/json in a browser on the WinCC machine. You should see a JSON response listing the available debug targets.

If it doesn't work, see Troubleshooting for step-by-step diagnosis.

About Unified Comfort Panels

Siemens does not provide a script debugging interface on Unified Comfort Panels. The Chrome DevTools Protocol endpoint (port 9222) that the debug proxy relies on is only available on the PC Runtime. This is a platform limitation, not a limitation of this tool.

For panels, consider the following alternatives:

  • Test on PC Runtime first - Develop and debug your scripts on a PC Runtime simulation, then deploy to the panel
  • Browser-based simulation - Use TIA Portal's "Start Simulation" to test scripts in a browser on your engineering station

What's next?