Remote Debugging of Software Problems
An overview of BB LogSys: Blueberry Consultants’ solution to the difficult problem of debugging software.
Although laypeople tend to think that modern PCs are quite standardised, the truth is actually the opposite: most PCs are customised by the applications installed, the options chosen and any new hardware added.
The level of variation in end-user PCs presents a serious challenge to software developers: a program that works perfectly well in the development lab can easily fail when released to end users. Even after careful testing on many PCs, it’s still extremely difficult to allow for all the possible variants. For example, there are 20 variants of Windows in use, plus virtual environments, Citrix and odd server environments – then factor in hundreds of thousands of hardware devices for Windows.
A similar problem can occur when systems are deployed into complex user environments, which are difficult to simulate in the lab.
So how can this problem be solved?
The best approach is to ramp up the testing dramatically, or make use of automated testing technologies. These approaches are sensible for mass-market software, where the sales revenues top millions of dollars. But large-scale testing is unaffordable for smaller projects. And even large-scale testing doesn’t guarantee to deliver bug-free software – which is one of the reasons why many mass-market products ship with bugs.
For many smaller projects, the practical solution is to rely on users to do some part of the testing. Of course, no software company would admit to doing this deliberately, but the economics make it inevitable – duplicating the final environment that the software will operate in is just too costly.
But this raises another issue: how to debug a problem that only happens on a remote customer PC? Unfortunately end-users are often not the best at reporting problems in software – many just send an e-mail saying “it crashed” – which obviously isn’t very useful to the development team.
Current Solutions To Bug Reporting
To solve this problem, developers need a way to see what is happening on remote PCs. They need something similar to the “black-box flight recorders” used by airlines – a tool which logs internal diagnostic information up to the point of the problem, and then returns it to the development team.
Of course, logging systems are not new. Almost all developers have written their own simple system at some point. But often logging is not seen as important within the project – and so most projects rely on simple solutions, written in spare time.
Home-grown logging systems suffer from a number of major limitations:
- Simple logging implementations usually write messages to a local disk file from code within the application. Unfortunately, if the application crashes, the most recent messages are often lost – defeating the objective of the system. If the programmer tries to solve this by forcing writes to disk frequently, application performance is usually badly degraded.
- Simple solutions don’t include useful features such as ensuring that old logs are deleted, or storing accurate timestamps.
- Often, the log information is simply written to a local file, buried in an inaccessible directory. Getting non-technical users to return the log to the developer can require a long and frustrating support call.
These problems can easily make logging ineffective in solving real problems. Often, companies end up sending developers on-site to fix problems just because they cannot get the diagnostics data back effectively. This clearly presents a major cost problem.
A Better Solution to Remote Debugging - BB LogSys
BB LogSys is a thorough, fully-featured and professional diagnostics logging system for custom software developers. It represents a mature, robust and tested solution to the problem of remotely debugging software problems. It also addresses the important issue of the remote return of logs from the end-user back to base.
Instead of writing logs directly to a file, client applications use a BB LogSys client library. This sends diagnostic messages to a separate BB LogSys server process which runs in the taskbar, where they are buffered in memory. This avoids the performance problem associated with repeatedly opening and closing files, while also protecting the log data in the event of an application crash.
BB Logsys includes many additional features to make logging more useful to the developer. It fully supports multi-threaded operation, and can automatically synchronise the PC clock.
It also completely solves the problem of returning the logs back to the development team. End users can press a simple “Send Report” button, and LogSys will zip the log files and send them via email or internet. It includes a detailed report on the PC configuration, so the engineer can immediately see the information such as the Operating System. It also includes a built-in screen capture tool – allowing end users to include pictures of the screen where the problem happened.
BB LogSys is built and deployed on Microsoft’s .NET Framework and is written in a combination of C# and C++. It’s primarily aimed at supporting desktop applications, but we still find BB LogSys to be of value when deployed to monitor web applications.
Although web applications suffer less from the problem of remote debugging (an engineer is able to connect remotely to the server and inspect files as he chooses), we gain an advantage in standardisation of output by using BB LogSys in all scenarios.
BB LogSys Bug Reporting - Feature Summary
- Time synchronisation: BB LogSys includes an NTP time-sync client to ensure that the time-stamps on returned logs are always correct.
- Unobtrusive monitoring: BB LogSys does its work quietly in the background and requires no user interaction. Provision does exist, however, for users to enable and disable BB LogSys via a simple, one-click option.
- Fail-safe design: BB LogSys keeps track of how much disk space is being used and ensures that logfiles don’t grow too large. If the configured space is exceeded, BB LogSys removes the oldest logs first.
- Intuitive user interface: BB LogSys presents a simple and intuitive UI.
- Supporting information: BB LogSys allows the user to drag and drop files to add to the error report. Users can add a PC’s specification report and also take and attach screen-shots.
- Multi-thread support: Logs obtained from multiple threads of execution are merged into a single output view to help engineers see what happened.
- Alternative submission methods: BB LogSys will first attempt to submit error reports via direct upload to one of Blueberry’s servers. If this is not possible – perhaps the network is offline or a firewall is preventing access – it tries via email. If both attempts fail, the user can choose to copy the error report and send it manually as an email attachment.
- Branding: BB LogSys does not contain Blueberry branding. This allows us to include it in customer applications without confusing users.
The Benefits of BB LogSys
The main benefit of BB LogSys should be clear: it makes it easier for developers to solve problems on end-user PCs without a site visit. Specifically:-
- BB LogSys provides all the detail required by customer support or developers to quickly identify the source of the problem reported by the end-user, which leads to a faster time-to-fix.
- BB LogSys simplifies the end-user problem reporting process, often reducing it to a single click on the “Report a Problem” button – helping to reduce the user’s frustration at the discovery of a problem.
- By default, BB LogSys will usually provide the support and development team with all the information they need. If additional information is required, the user can easily provide it via features built into the BB LogSys software.
- The integration of BB LogSys into your product can help to demonstrate to your customers that you take aftercare support seriously.
Diagnostics and testing of systems is often overlooked during the planning of a software project, but resolving hard-to-fix issues can turn an otherwise successful project into a nightmare.
BB LogSys is Blueberry’s professional and thorough solution to this problem. We include this technology on all projects that we work at no additional charge – it is part of our commitment to project success.
For further information on how Blueberry can make your project a success please phone, or contact us via our Enquiry Form.