Root > Troubleshooting > EurekaLog run-time problems

EurekaLog run-time problems

Previous pageReturn to chapter overviewNext page   

Once you have verified that EurekaLog's code and data was added to your executable - you can start to diagnose what is wrong at run-time.

 

Most common problems

1. You have assigned Application.OnException event handler or have used TApplicationEvents component (VCL.AppEvnts unit).

 

When you assign Application.OnException event (this is also what VCL.AppEvnts unit does) - EurekaLog assumes that you want to handle exception by yourself. You may remove your Application.OnException handler (and remove VCL.AppEvnts unit) or call EurekaLog manually from your handler (call HandleException routine from EBase unit).

 

2. You dropped TEurekaLogEvents component on the form but did not enabled EurekaLog for your project via "Project" / "EurekaLog Options" menu. TEurekaLogEvents component is supposed to react on EurekaLog's events, but it does nothing if EurekaLog is not added. Please, enable EurekaLog for your project as explained here.

 


 

Additionally, EurekaLog contains self-debug code which helps you to diagnose problems with EurekaLog itself. Usually this debug code is used when you're not able to debug your application directly. For example, when your application stop working after protecting it with EXE protector tool. If you pack or protect executable - it usually will not work under debugger. That's when you can use debug code to find out the reason.

 

 

Prepare

Debug code is present only in debug version of EurekaLog .dcu files. You have to enable debug version before using debug features:

If you're using precompiled files (default): go to Project / Options and turn on "Use Debug DCUs" option.

 

 

Alternatively, you can add explicit search path to C:\Program Files\Neos Eureka S.r.l\EurekaLog 7\Lib\Win32\Debug\Studio11\ (change the path to match your installation and IDE version).

 

If you're using recompiled files (for Enterprise only): be sure to enable "DEBUG_EL_CODE" conditional symbol in project options.

 

 

Important: Be sure to make a full rebuild of your project (not just simple compile).

 

 

Normal run

First, make a normal run with normally working application. Run your application with --el_debug command line option.

 

 

This option will turn on debugging code in EurekaLog. Debugging code will capture and log information about EurekaLog's work during application life time.

 

You can also use --el_debug_standalone or --el_debug_unique arguments instead. The difference between --el_debug, --el_debug_standalone, and --el_debug_uniue command line options:

--el_debug option will create a single common log file (el_debug.csl);
--el_debug_standalone option will create one file for each EurekaLog module (.exe or DLL) in your application (your-exe-name_el_debug.csl);
--el_debug_unique option will create one file for each EurekaLog module with unique name (your-exe-name_el_debug_date_GUID.csl).

 

Alternatively, you may create empty file with the following name:

your-exe-name-el_debug (e.g. Project1.exe-el_debug) as analog for the --el_debug option;
your-exe-name-el_debug_standalone (e.g. Project1.exe-el_debug_standalone) as analog for the --el_debug_standalone option;
your-exe-name-el_debug_unique (e.g. Project1.exe-el_debug_unique) as analog for the --el_debug_unique option.

The content of the file does not matter, EurekaLog will simply check if such file exists. If it does - then EurekaLog would act as if you has passed corresponding command-line option.

 

Note: Logging may affect performance of your application. Your application may run slower than usual. This is a normal behavior.

 

 

Locating debug output

EurekaLog will create a .csl file in the same folder as application file. This file will contain all debug output after application's exit. If default place (app's folder) is write protected - then file will be placed to Application Data folder. Name of the file will depend on used command line option:

el_debug.csl for --el_debug;
your-exe-name_el_debug.csl for --el_debug_standalone;
your-exe-name_el_debug_date_GUID.csl for --el_debug_unique.

 

If you can not find the debug file - use IDE's event log:

 

 

Alternatively, you may use DebugView tool. Download and run DebugView tool, then run your application with any of --el_debug command line options. The DebugView tool will display location for debug output file.

 

 

Note: DebugView tool could not be used to capture debug output itself;

 

 

Problem run

Now, recompile your application with problematic configuration. Run it and make sure it doesn't work as expected. Then run your application again with any of --el_debug command line options. This will produce a new .csl file.

 

Note: each run will overwrite .csl file. Be sure to rename/make a copy before running application next time. Or use --el_debug_unique option.

 

 

Compare results

You can compare two log files which were captured from working and non-working application. Find the differences. Differences will indicate what was going wrong.

 

EurekaLog produces .csl file - which is compatible with Raize Software's CodeSite File Viewer tool. CodeSite File Viewer tool is shipped with recent versions of IDE, you can install it during IDE installation or via GetIt. Alternatively, you may download a free CodeSite tools from Raize web-site. See also for more details.

 

 

A typical exception was handled in VCL forms application

 

Note:

It is a good idea to organize log messages by threads. Additionally, you may organize by categories.
EurekaLog simply streams log to CodeSite-compatible file format. However, it is not a replacement for CodeSite. It does not support dispatching (e.g. Live Viewer, Controller, destinations, TCP, etc.), EurekaLog does not have many CodeSite features.
While you may use EurekaLog for your own logging, you may want to use a proper logging framework.

 

 

See also:




Send feedback... Build date: 2018-11-26
Last edited: 2018-06-14
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/fix_runtime_issues.php