How to turn on additional error reporting

Last updated on

When using the API protection method, it is strongly recommended that you display or log all error codes and extended error codes that are returned to your protected software by DDProtCheck(), to assist you with troubleshooting when something goes wrong. If you need to troubleshoot software that does not display or log error codes for some reason, you can enable additional error reporting by setting the DD_ERRCODE environment variable. When this environment variable is set to on, DDProtCheck() will display a message containing the error code and extended error code in an error dialog (Windows and macOS), or write it to stdout (Linux).

Windows

  1. Type "environment variables" into your start menu or taskbar search box and select 'Edit environment variables for your account' to open the Environment Variables dialog.
  2. Under 'User variables for <your username>', click 'New...'
  3. Enter DD_ERRCODE for the name, and on for the value, then click 'OK' on each dialog to close it and save your changes.

To disable additional error reporting, open the Environment Variables dialog, select DD_ERRCODE in the list and click 'Delete'. Then click 'OK' to save your change and close the dialog.

macOS and Linux

  1. Open a terminal and enter the command export DD_ERRCODE=on.
  2. Start your protected software from this terminal, so that the environment is inherited.

The environment variable is temporary and will cease to exist when you exit the terminal.