WinCC Unified Trace JavaScript
To debug our scripts in WinCC Unified, there are two methods; one is with an application that we will see here, and if you are used to WinCC, it is a must-have, and the other is with the browser itself.
The function we use is exactly the same as in WinCC HMIRuntime.Trace("Message we want to display");
We can run the application directly, or with TIA Portal, we can create a direct link to run it later; if we want to do the latter, here is the procedure
Tools --> External applications --> Configure
And we define the path of our application. In this case, there is no need to pass any arguments. With this, it would be ready, and every time we need it from TIA Portal, we run it.
If on the other hand, you want to run it independently, this is the path where it is located.
We can now observe and debug our Scripts.
If we are only interested in the Scripts, it is ideal to filter by Filter --> Module --> ScriptHMIRuntime.
14-03-2020