Delphi has a robust integrated debugger. For standard tasks, the built-in debugger is often sufficient. However, there are times when you need more detailed information or want to perform in-depth analysis beyond what the standard Delphi debugger offers. Fortunately, Delphi is highly extendable, allowing the use of additional tools to enhance its debugging capabilities. In this article, we will explore four external tools, evaluating them based on functionality, ease of use, price, and support.
For this analysis, we have selected the following tools:
Among these tools, Jedi Debug is the only one that is free for commercial use. MadExcept offers free use for non-commercial purposes but requires a commercial license for business use.
A good tool helps you as a developer to find and solve errors more quickly. A good stack trace is essential for this. A stack trace is an overview of calls in the order they occurred up to the point where your program encounters an exception. Each item in this stack trace has information such as the name of the procedure or function, the location in the source code, and the line number. This makes it very easy to find the exact location where the exception occurs and the variable values at that point.
TMS MemInsight is a relatively new tool, launched in 2022. It is a tool for Delphi runtime memory allocation analysis, exception stack trace logging, and thread inspection.
MemInsight consists of one component: TTMSMemInsightProfiler. You can place this component on any form or data module. The biggest difference with the other tools in this overview is that MemInsight provides a runtime overview of the statistics, exceptions, and memory status of your application directly, rather than only after your application closes or crashes. This makes it a handy tool to use directly during development. Furthermore, all the functionality you expect from a debugging tool is present: a memory profiler, a thread viewer, a module viewer, and an enhanced exception handler.
There is no option to automatically send the stack traces, making it more suitable for developers and less for production systems.
Unlike MemInsight, MadExcept has no visual components that need to be placed on a form or data module. Instead, you can activate MadExcept per project.
MadExcept captures exceptions that occur in your application. With MadExcept, you can hide any access violations, send the stack trace to FTP, email, or a web service, or display a screen where the user can choose whether the report should be sent. Additionally, detailed log files or exception logs can be saved and viewed with a separate viewer. It is not possible to get a runtime overview of memory usage or previously occurred exceptions as with MemInsight.
Eurekalog also focuses on making potential error messages or exceptions that can occur in your application more user-friendly. Although no free, non-commercial version is available, the price is comparable to MadExcept. Functionally, MadExcept and Eurekalog are very similar. However, Eurekalog has more extensive options for sending stack traces and log files to bug trackers like Mantis, Jira, or GitHub.
Eurekalog has a more extensive option set than MadExcept, although both products are comparable in core features. In details such as localization, Eurekalog has more to offer. On the other hand, MadExcept seems to have less overhead and works faster for larger projects.
Jedi Debug, or jclDebug, can be installed via the GetIt package manager or manually via https://www.delphi-jedi.org/
jclDebug does not have a convenient installer or a way to configure the exception handler like MadExcept or Eurekalog. Instead, you need to manually create and configure the debug handler, for example, in the initialization and finalization sections of your application.
Since jclDebug belongs to the open-source project Jedi, jclDebug is free to use. However, you lose some functionalities, such as easily configuring the options and automatically sending bug reports, including stack trace. If you want complete flexibility in how exceptions are handled, jclDebug is definitely worth exploring.
There are more open-source tools on the market, including DebugEngine (https://github.com/MahdiSafsafi/DebugEngine). Unfortunately, DebugEngine is outdated and is no longer actively maintained, which makes it risky and unreliable for production systems. Additionally, for example, FastMM5 only supports JCL, MadExcept, and EurekaLog, so I would personally use one of these three for exception handling.
Finally, there are tools that focus more on detecting memory leaks, such as Delphi LeakCheck and FastMM. However, these tools do not support exception handling, so they fall outside the scope of this article.
Feature | TMS MemInsight | MadExcept | Eurekalog | Jedi Debug |
---|---|---|---|---|
Price | €115 – €460 | €79 – €399 | $149 – $749 | Free |
Memory profiling | Yes | No | No | No |
Stack trace logging | Yes | Yes | Yes | Yes |
Bug tracker integration | No | Yes | Yes | No |
Ease of use | High | High | Medium | Low |
Commercial License | Yes | Yes | Yes | No |
Which tool you choose depends on your goal with these tools. If you want insight during development, TMS MemInsight is very useful. With a single component, and without much configuration, you can immediately gain insight into statistics, memory usage, and stack traces in case of exceptions.
If you want to use exception handling in production systems, MadExcept and Eurekalog are essential. Both products have a long and proven history, are stable, and offer a lot of functionality. The choice between MadExcept and Eurekalog is personal; both products are a valuable addition to gain better insight into potential runtime problems.
And if you don’t want to spend money on these tools, there is a free and open-source alternative, although you will have to build much of the functionality yourself.
As you can see, there is a solution for every situation, which once again shows that the ecosystem around Delphi is very valuable for developers.
Contact
GDK Software UK
(+44) 20 3355 4470GDK Software USA
+1 (575) 733-5744