Root > How to... > ...enable/disable EurekaLog? > ...enable EurekaLog for production, disable for development?

...enable EurekaLog for production, disable for development?

Previous pageReturn to chapter overviewNext page   

A common usage case is have EurekaLog enabled only for production.

 

EurekaLog is a tool, designed to gather reports about issues from users of your application. Therefore, it can not use heavy debugging code to not slow down execution of your application too much. It means that using a local IDE debugger will usually be more convenient. That is why many developers prefer to use IDE's debugger during developing, and use EurekaLog only for production.

 

This article will discuss the case when you want to have EurekaLog enabled in one build configuration, but not in another. If you want EurekaLog to be enabled for both Debug and Release build configurations, but with different settings - please, see How to use different settings for development/production article instead.

 

Important Note: some features of EurekaLog can be automatically disabled if no debugger is present. For example, memory leaks and freeze/hang/deadlock detection. Therefore, if you are only interested in those features - you may not need to do anything at all. Just configure the features.

 

 

How to differentiate between development and production builds

Default project configuration in modern IDEs has 3 build configurations defined:

Base build configuration
Debug build configuration
Release build configuration

The supposed meaning is using Debug build configuration for developing and using Release build configuration for production.

 

 

Default build configurations

 

You can also check current build configuration in your source code:

 

{$IFDEF DEBUG}
ShowMessage('Development build');
{$ELSE}
ShowMessage('Production build');
{$ENDIF}

 

We recommend to follow that approach.

 

Important: you are supposed to configure Release build configuration for EurekaLog.

 

Note: if you are using old IDE without build configurations support - the alternative way would be to create two projects, which will include the same set of units and share the same project source (.dpr file). Assign one project to be a development project, and second project to be a production project. The example below would use modern IDE as an example.

 

Important: do not forget to make a full project rebuild (not just compile) when you have switched active build configuration.

 

 

How to disable EurekaLog for developing

Go to Project / EurekaLog options (see also):

 

 

EurekaLog project options in IDE menu

 

Don't see EurekaLog menu items?

 

You should see the "General" page. Uncheck all checkboxes in "Build Configurations" list:

 

 

EurekaLog is disabled for the whole project

 

This will disable EurekaLog for the whole project. Now check only build configuration that you want to use with EurekaLog. E.g. Release:

 

 

EurekaLog is enabled only for production build configuration

 

Important:

2.Do not forget to make a full project rebuild (not just compile) when you have switched active build configuration.
3."Disabling EurekaLog" means removing the EUREKALOG conditional symbol. EurekaLog's IDE wizard will take care of automatically managed EurekaLog's units, but you may have added other references to EurekaLog's units manually. It is your task to ensure that your project does not reference EurekaLog's units when you are compiling it without EurekaLog. See also: How to write code with EurekaLog?

 

If you want to learn more details - see Compiling with and without EurekaLog.

 

 

See also:




Send feedback... Build date: 2024-09-30
Last edited: 2023-07-18
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/how_to_disable_for_development.php