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 (similarly to RTL's TApplicationEvents), 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 a reason for the issue.




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).


Note for C++ Builder users: C++ Builder projects may contain direct links to EurekaLog files, rather than reference names and use search folders. Basically, you must ensure that you are compiling with "Debug" version of EurekaLog files. Default is "Release". You can rename/remove EurekaLog's \Lib\Win32\Release\ folder to ensure that these files are not being used/referenced.


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



Alternatively: enable define in file, which can be found in \Source\Common\ subfolder of your EurekaLog installation:



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 (see below for alternatives).



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). This is useful when you debug restarts in your application, or if your DLL is being loaded/unloaded multiple times.


Important Note: 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.


Finally, if you have opened log file manually for your own logging purposes - you may simply set ELogging.EL_Debug global variable to True:


// ...
  // Create log file manually (optionally, only for permanent log file)
  ExeName         := ParamStr(0);
  LogFileName     := ChangeFileExt(ExtractFileName(ExeName), '.csl');
  LogFolder       := ExpandEnvVars('%APPDATA%'); // ExpandEnvVars is declared in ESysInfo unit
  FullLogFileName := IncludeTrailingPathDelimiter(LogFolder) + LogFileName;
  // Ask EurekaLog to automatically log to FullLogFileName file

  // This will be ignored if app is compiled with Release version of EurekaLog files 

  // (e.g. without DEBUG_EL_CODE symbol defined)
  EL_Debug := True;
  // Do some manual logging 
  ELog('Say Hello');
  ELog('I', I);
  ELogMemoryAsHex('Stream', Stream.Memory, Stream.Size);
  // This will be logged automatically by EurekaLog - because EL_Debug = True
  raise Exception.Create('Test');


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 (for example: %APPDATA%\Neos Eureka S.r.l\EurekaLog\Bug Reports\your-executable\). 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.


Important Notes:

%APPDATA% folder is specific to user account. Each user account has its own %APPDATA% folder. EurekaLog will use %APPDATA% folder of user running your executable. For example:

If you are writing a Win32 Service application - such application is run by "Local System" account by default. "Local System" account has its own %APPDATA% folder, for example: "C:\WINDOWS\system32\config\systemprofile\AppData" or "C:\WINDOWS\SysWOW64\config\systemprofile\AppData" (depending on bitness of your application and operating system).
If you are writing a low integrity application (such as ISAPI DLL running by IIS) - such applications are very restricted. Low-integrity APPDATA folder will be used: C:\Users\UserName\AppData\LocalLow\Neos Eureka S.r.l\EurekaLog\Bug Reports\your-executable\
Sometimes there is no writable location, in which case EurekaLog will default to the C:\Windows\Temp\ folder.


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;


If you still can not find debug output - you may specify its location manually (do this as early as possible; we recommend to create a new empty unit and place this code inside initialization section):


// ...
  // Create log file manually 
  FullLogFileName := 'C:\writable-folder\debug.csl';
  // Ask EurekaLog to automatically log to FullLogFileName file

  // This will be ignored if app is compiled with Release version of EurekaLog files 

  // (e.g. without DEBUG_EL_CODE symbol defined)
  EL_Debug := True;


Please note that target file must be writable by user account under which you are running your application. It does not matter if this file is writable under your current user account.



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 freeware CodeSite Tools from Raize web-site. See also for more details.



A typical exception was handled in VCL forms application



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.




Debugging IDE itself

You can also create run-time log for any EurekaLog executable - tools, even EurekaLog IDE expert. You don't have to perform any special setup, because all EurekaLog executables are already compiled with debug mode included. All you need to do - is to run EurekaLog executable with appropriate command line debug switch.


For example, if you want to diagnose EurekaLog in IDE - close your IDE, and edit shortcut's properties (.lnk): add "--el_debug" command-line switch to your IDE:



Enabling debug mode for IDE


Run your IDE and perform all steps as usual (e.g. project setup, compilation, etc.). Close your IDE.


Look for el_debug.csl file in %APPDATA%\Neos Eureka S.r.l\EurekaLog\Bug Reports\bds.exe\el_debug.csl folder (it can also be found in \bin folder of your IDE, when IDE has permissions to write to this folder). Send us this .csl file for analyzing (please, pack it inside any type of archive).


Note: this will produce log for IDE only. It will not produce log for your own application. Use instructions above to create log for your application.



Debugging EurekaLog's command-line line compilers (ecc32/emake)

Sometimes you may need to capture run-time log for EurekaLog's post-processing tools (ecc32/emake).


1. If you are calling ecc32/emake manually (e.g. via script or from command line) - just add --el_debug command line switch as described above.


2. If you are compiling from IDE - enable "Debug output" and "Troubleshooting" options:



Compile your project after closing the dialog.


Full file name for *.csl file will be shown immediately after the ecc32 header in ecc32's output:



Debug output (*.csl file) will be located in the %APPDATA%\Neos Eureka S.r.l\EurekaLog\Bug Reports\ecc32.exe\ folder by default, which you can open via Start / Programs / EurekaLog / EurekaLog Bug Reports;
Alternatively, if you have installed EurekaLog in non-default location, or if you have configured EurekaLog for development (e.g. made folders writable) - you can find debug output (*.csl file) in the \Packages\Studio27\ folder of your EurekaLog installation. Where: "Studio27" is a name of your IDE (replace with your IDE name);


Send us this .csl file for analyzing (please, pack it inside any type of archive).



See also:

Send feedback... Build date: 2023-09-11
Last edited: 2023-07-31
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: