Overview
The WinCC Unified Debug Proxy is a lightweight proxy server that relays Chrome DevTools Protocol (CDP) traffic to the WinCC Unified runtime. It enables seamless script debugging in VS Code with automatic reconnection when scripts reload.
The problem
Debugging WinCC Unified scripts is painful. Here's why:
-
Constantly breaking connections — WinCC Unified exposes its scripts via CDP debug targets, but every time a screen reloads (navigating between screens, making changes, or runtime restarts), the debug target changes. A new session is created with a new ID, and the old one disappears. Your debugger loses its connection and you have to manually reattach — every single time.
-
The
chrome://inspectworkflow is slow — The default way to debug WinCC scripts is through Chrome DevTools viachrome://inspect. Every time a screen refreshes, you need to open a new DevTools window — separately for Dynamics and Events. That's two new windows per reload, constant clicking, and losing your breakpoints and console history each time. It's incredibly time-consuming. -
Multiple script contexts — WinCC separates scripts into Dynamics (property animations, value updates) and Events (button clicks, screen events), each running in their own V8 context. You need separate debug sessions for each, doubling the reconnection headache.
Siemens has their own VS Code extension for WinCC Unified debugging, but it requires running on the WinCC machine itself, needs manual reattaching after screen changes, and isn't available in the VS Code Marketplace.
The solution
This proxy sits between VS Code and WinCC, solving all of the above:
- Automatic reconnection — The proxy monitors WinCC for target changes. When a target changes, it closes all client connections, causing VS Code to automatically reconnect (via
"restart": true) to the new target. Zero manual intervention. - Separate proxy ports — Dynamics and Events each get their own proxy port, so you can debug them independently or together.
- Automatic session selection — When multiple targets exist, the proxy automatically selects the most recent active session.
Quick start
# Generate VS Code launch.json
./wincc-unified-debug-proxy.exe init
# Start the proxy (WinCC on localhost)
./wincc-unified-debug-proxy.exe run
# Or connect to a remote WinCC machine
./wincc-unified-debug-proxy.exe run -t 192.168.1.100Head over to Installation to get started.