Identify Bugs & Find Solutions
By Mike Riley
In today s world of interconnected everything, expectations of application stability, analysis, and notification are consistently elevated, along with the rapid response to a bug or security flaw. However, such reactive practices often leave those responsible for the code wondering why a particular problem occurred. If the application was not properly architected with mechanisms to inspect, trap, and report potential problems, the time required to isolate the reasons behind the issues further extends the repair time necessary to eradicate them.
Gurock Software, the creators of SmartInspect Professional, recognized this reality of the new world and forged a solution that not only works on a local machine level but also via distributed TCP/IP connectivity with minimal impact to the machine s resources. By doing so, Gurock has architected the ability to instrument an application not only for testing purposes but also for ongoing use in a .NET, Delphi, or Java multi-threaded application production environment. One approach to this might be to leave the SmartInspect code in the released application with an option to enable or disable it to facilitate remote internal analysis and debugging. For example, if a customer is having an application die randomly, they could be instructed to activate the debug switch and, with their permission, have the application transmit its active state via TCP/IP to the SmartInspect Professional Console for persistent logging until the problem is filtered, quickly identified, and eliminated. Likewise, those developers intent on minimizing any impact to network traffic and execution performance can dump debug output to a log file for later importation into the Console. This activation switch for capturing log data is as easy as setting the SiAuto.Si.Enabled run-time property to true.
Figure 1: The SmartInspect Professional Console is the heart of the product, where log entries and tagged application variables, threads, and processes are displayed, filtered, and analyzed in exquisite detail.
The product, which includes its full source code, is easy to use, well documented, and quick to implement. After adding the SmartInspect libraries and compiling the logic to call upon these now embedded debugging functions, the majority of time with SmartInspect is spent working within the Console. With its clean and intuitive interface, the Console is the heart of SmartInspect and can be configured at the time of the product s installation to work within the Visual Studio.NET, Delphi, and JBuilder IDEs, as well as its default standalone mode. Unfortunately, in order for the product to work its magic, the SmartInspect functions must be compiled into the application being monitored. While this is an obvious requirement, it nevertheless means that developers and testers can t simply point SmartInspect at any application and start monitoring its state. Although products do exist that can perform this function, they are considerably more expensive and more invasive on the underlying operating system and can sometimes have a considerable impact on system-wide performance. By architecting SmartInspect capabilities into the application at design time, its benefits continue to accrue throughout the application s lifecycle. For the curious, the magic behind the simplicity of SmartInspect is explained online at http://www.gurock.com/products/smartinspect/howitworks/.
As the SmartInspect objects are called upon within a running application, they can transmit information ranging from variable values and messages to objects, images, and files. This information can then be transmitted to multiple tiers of the development organization via the Console s export to CSV and HTML XML, as well as forwarding logs from the Console via e-mail attachments. Logs can also be annotated with comments for future review or additional distributed analysis and notation. Regardless of the log capture techniques employed, the Console can apply up to nine views on the output, ranging from source code to Web view.
One of SmartInspect s most helpful features is its ability to isolate thread analysis. This benefit alone is worth the price of the product. Any developer who has struggled to debug an application serving hundreds, perhaps even thousands, of users simultaneously trying to debug individual threads with a standard debugger knows how challenging and tedious such a task would be. Enable SmartInspect s process flow with AutoView rules and each newly created thread can be closely monitored throughout the thread s lifespan for any anomalies.
Figure 2: The Process Flow Toolbox is indispensably helpful for multi-threaded, multi-process application debugging analysis.
SmartInspect makes such capabilities seem so obvious in a standard debugger that once you re used to the immediacy and accessibility to details, it s hard to imagine not using its libraries as standard procedure for all .NET development.
Figure 3: SmartInspect ships with excellent online help detailing the program s use and programming libraries.
The price is right, as are the licensing terms, and the added bonus of the product s source code means that buyers can review and modify the application for their own customized needs. Serious developers working on serious projects that are being deployed in highly distributed environments should consider this serious tool for their future .NET, Delphi, and Java debugging and troubleshooting needs.
Mike Riley is an advanced computing professional specializing in emerging technologies and new development trends. Readers may contact him at mailto:[email protected].