Debugging | Visual Studio tools m_counter == 123 || m_counter2 == 321 && hr == 0 m_counter == 123 Monitoring module instances The OID of the object is stored in m_objId , so the monitoring of the OID can look like this m_objId == 0x01010010 Monitoring of tasks A special variable #taskId is provided to access the OID of the calling task. E.g.: #taskID == 0x02010010 Option: Has changed The option “Has changed“ is simple to understand: By providing variable names, the value will be monitored and execution will be held, if the value has changed from the cycle before. Samples:
m_counter m_counter && m_counter2 10.2 Visual Studio tools | Visual Studio tools Visual Studio makes the usual development and debugging tools available for C++ developers. TwinCAT 3 extends these Visual Studio tools, so that debugging of C++ code that runs on a target system is also possible in TwinCAT 3 Engineering with the Visual Studio tools. The corresponding advanced tools are briefly described here. If the corresponding windows are not visible in Visual Studio, they can be added via the menu item Debug -> Windows . The menu is context-dependent, i.e. many of the windows described here only become configurable once a debugger is linked to a target system.
Callstack The Call Stack is displayed by the Call Stack tool window when a breakpoint has been reached. Autos / Locals and Watch The corresponding variables and values are displayed in the Autos / Locals window when a breakpoint is reached. Changes are shown in RED. TwinCAT 3 79 Version: 1.19.1