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 problems1. 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.
PrepareDebug code is present only in debug version of EurekaLog .dcu files. You have to enable debug version before using debug features:
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.
Alternatively: enable define in ELDefines.inc 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 runFirst, 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:
Important Note: Alternatively, if passing a command line argument is not an option - you may create an empty file with the following name:
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.
The file name should always use your main executable - even if your project is a DLL or a package. For example, if a Host.exe loads Project2.dll:
Finally, if you have opened log file manually for your own logging purposes - you may simply set ELogging.EL_Debug global variable to True:
uses // This will be ignored if app is compiled with Release version of EurekaLog files // (e.g. without DEBUG_EL_CODE symbol defined)
Note: Logging may affect performance of your application. Your application may run slower than usual. This is a normal behavior.
Locating debug outputEurekaLog 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:
Important Notes:
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):
uses // This will be ignored if app is compiled with Release version of EurekaLog files // (e.g. without DEBUG_EL_CODE symbol defined)
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 runNow, 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 resultsYou 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
Note:
Debugging IDE itselfYou 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:
Send us this .csl file for analyzing (please, pack it inside any type of archive).
See also:
|