Working with TwinCAT Task Dumps

Working with TwinCAT Task Dumps 1:

From TwinCAT 3.1 Build 4026

This function is available from TwinCAT 3.1 Build 4026.

If an exception occurs, TwinCAT runtime automatically writes "TwinCAT Task Dumps" to the boot directory (usually C:\ProgramData\Beckhoff\TwinCAT\3.1\Boot) if it is not handled by the application.

These Task Dumps can be transferred and evaluated by the TwinCAT C++ developer on a development system with Visual Studio for TwinCAT C++ development.

For the investigation, it is necessary that, in addition to the TwinCAT task dumps, the exact corresponding TMX and PDB files are also available.

If the TwinCAT Task Dump is loaded directly from the appropriate Solution, these files are found automatically. If the TwinCAT Task Dump is loaded from an empty Solution, the associated TMX and PDB files can be placed in the same directory as the TwinCAT Task Dump. Alternatively, it is possible to enter a search path in the Visual Studio options (Tools->Options->Debugging->Symbols: add new Path to Symbol file (.pdb) locations).

The procedure is then as follows:

An exception has occurred on the target system.
1. The TwinCAT Task Dump file is transferred from the target system to the engineering system. It has a name like taskmemory-*.dmp
2. Ideally, the appropriate sources of the TwinCAT project are available and are opened in Visual Studio.
3. The file can be opened via File->Open->Open TcTaskDump:
Working with TwinCAT Task Dumps 2:
4. The editor jumps directly to the appropriate code location that triggered the exception:
Working with TwinCAT Task Dumps 3:

In addition, standard Visual Studio windows can be used to control variable values, for example:

Working with TwinCAT Task Dumps 4: