Debugging a driver extension - COPA-DATA/DriverExtensions GitHub Wiki
To debug a driver extension ensure that Visual Studio and zenon Runtime are executed in the same user context (same user and same elevation level).
- In project properties, select tab "Debug" and select as launch setting "Executable". Select the GenericNet.exe file within the zenon installation directory.
Example for zenon version 12. Adjust for the version accordingly:
C:\Program Files (x86)\COPA-DATA\zenon Software Platform 12\Engineering\GenericNet.exe
Add the option--ipc=TCPas a command line argument.

- Ensure, that the driver DLLs are copied into a sub directory of the DriverExtensions-Folder (
C:\Program Files (x86)\COPA-DATA\zenon Software Platform 12\Engineering\DriverExtensions) - Create a GenericNet driver instance in the zenon project and configure it to use the driver from that folder.
- Stop the Service Engine if it is already running and start the driver project in Visual Studio. Check if a new process called
GenericNet.exeis started. - Set a breakpoint within the
InitializeAsync-Method of your driver's code. - Start the Service Engine from the Engineering Studio.
- The break point is hit and you can start to debug the driver extension within Visual Studio.
Possible reasons, why the InitializeAsync-Method is not called:
- The zenon project does not have a GenericNet driver configured that uses your specific driver extension.
- Visual Studio and Service Engine are not started in the same user context or one of them is started with Administrator permissions.
- The driver extension or dependencies are not copied to the configured sub directory of DriverExtensions folder.