CobaltFusion / DebugViewPP

DebugView++, collects, views, filters your application logs, and highlights information that is important to you!
Boost Software License 1.0
978 stars 144 forks source link
dbgview debugging-tool debugview filter logfile outputdebugstring regular-expression

-- Notice:

Debugview++, currently at v1.9 (2024 Update!)

<img src="https://img.shields.io/twitter/follow/janwilmans.svg?style=social&logo=twitter" alt="follow on Twitter">

Mastodon Follow

All Releases Current Release Appveyor Build status

Version 1.8.x

Download latest release, I would really like to hear what you think! Leave any comments here

Download head version only pick this if your feeling lucky and want to try the latest commits

Questions? Tweet me at @janwilmans or chat on skype at 'janwilmans'. There is also a slack channel. If you need an invite, go here.

Debugview++ started as a viewer for Win32 OutputDebugString messages in the style of Sysinternals DebugView. However, it can now be attached to virtually any other kind of logging, such as:

See examples down below.

Sponsors

This project is sponsored by:

Resharper logo

Build in code analysis, handy auto-fixes and refactoring options

Backtrace logo

Gather and analyse crash information.

Incredibuild logo

We use Incredibuild to make use of all cores of multiple machines to accelerate building our C++ projects.

So when is this Debugview++ thing useful?

New in stable version 1.8.x:

Features we dream about and will create when we choose to spend the time:

Known issues:

References

OutputDebugString on MSDN

Screenshot

DebugView++ Screenshot

Here are some features:

And more features:

Download old version (stable, dated 20 Sept 2015)

Screenshot demonstrating bookmarks and highlighting features.

Highlighted:

See http://www.cplusplus.com/reference/regex/ECMAScript/ for all options for supported regular expressions

Android ADB example:

DebugView++ Screenshot

Screenshot demonstrating connecting to ADB logcat (Android Debug Bridge)

More examples

Connect any pipe:

To connect directly to a port or service, plink can be used, make sure an instance of debugview++ is already running before running this command:

plink -ssh -batch -v 192.168.0.1 2>&1 | debugview++

Notice that 2>&1 is used before the pipe (|) symbol to redirect stderr to stdout.

Connect to sysinternals dbgview agent for kernel messages:

Example: connect to sysinternals DbgView Agent, first start Dbgview.exe /a /k (/k for kernel messages) And connect DebugView++ using Log->Connect DebugView Agent. Note that 'Log->Connect DebugView Agent' assumes the agent is running on the same workstation as DebugView++ so it connects to 127.0.0.1. If you need to connect to a remote agent, use Log->Sources...->Add->DbgView Agent and fill in the ip-address.

Use RegexGroups + Token Highlighting:

Suppose you want to highlight some data value in your logging, since the actually value may differ, you cannot use normal matching to highlight them. With RegexGroups you can match text before or _after the actual token you want to highlight.

Example:

FilterDialog Screenshot

Filters:

FilterDialog Screenshot

Filters can be defined per view, for example choose File -> New View, and the filter dialog will popup. Pressing OK will open a new view without any filters.

Different types of filters:

All filters support regular expressions, if you are not familiar with regular expressions you can just type any word or part of a word to match.

Practical uses:

Include, exclude, once and highlight filters are the most intuitive filters to use. Track and stop can be a little confusing, let me try to give some examples.

track: use this filter to focus interesting lines that do not occur very often, but at a regular interval, for example, so you are monitoring a process that logs output every 30 seconds and you need to check the result.

stop: this filter is good when some special event occurs (an exception?) and you want to inspect the context of the event in the log before continuing. A press of the 'end' button will resume auto scrolling.

Other features:

views:

link views: the selected line in the current view is located re-selected when you switch to another view. This is done on a best-effort bases, so if the exact line is not found, the nearest line is selected. In that case switching views will cause the currently selected line to change.

Consider this use case:

If you want to have auto scroll on, but some high frequency messages are annoying you, but you cannot exclude them because they help you diagnose your event when it occurs, try this:

Use two views, one where the diagnostic messages are filtered and autoscroll is on, and one where the messages are included (and maybe highlighted), next turn on the 'link views' feature.

Now you can monitor the filtered view, and when your event occurs, select a line and switch to the unfiltered view, the same line is now highlighted, but in full unfiltered context.

process colors: If enabled each process (even processed with identical names) will get a its own background color automatically without adding any filters.

Other documentation:

Auto Scroll: scrolls down to new incoming lines automatically

Auto Scroll Stop: If enabled 'auto scroll' is turned on when the last line in the view is selected, and also turned off if any other line is selected.

Bookmarks: bookmarks are view specific and can be placed on a line by clicking left of the line number or Ctrl+F2, press F2 to move to the next bookmark. Bookmarks are temporary, so cannot be saved.

ClockTime: when enabled the time is displayed as provided by the system's real-time clock (RTC). Such a timestamp has a 16ms resolution on a typical desktop PC. When disabled, time is displayed as a relative time to the first message, however this timestamp is obtained from the High-Performance Counter (HPC) which typically has a sub-microsecond resolution.

The resolution should not be confused with accuracy here, the recorded timestamp is not the actual time the message occurred, it is the time the message was received by DebugView++. Also there is no guarantee that the time between occurrence and reception of messages is constant, however in practice this is pretty constant :)

How to build

This project has a special configuration:

The projects are configured to use Nuget to get there dependencies (boost and WTL) However, to build the installer you have to install Wix Toolset manually

cloning the GIT repository:

git clone --recurse-submodules https://github.com/CobaltFusion/DebugViewPP.git

(don't forget to include --recurse-submodules, otherwise you will get an error message saying docopt.h is missing.) You press 'build' and visual studio will download boost and WTL the first time only and then build the project. It is as simple as that... if it is not, contact me (jan), so I can fix any remaining issues.

Since we use ATL and support Windows XP still some extra installation options are required, verify that the following option are installed:

VS2017 Option screen

VS2019

There are known issues with compilation using Visual Studio 2019 16.10.x (preview at March 11, 2021). Know good combinations are Boost 1.69 + Visual studio 2019 16.9.1. (I have seen problems with Asio in Boost 1.72 + Visual studio 2019 16.9.1 and Boost 1.72 + Visual studio 2019 16.10.x)

-= Cobalt Fusion =-

Jan Wilmans mailto:janwilmans at gmail.com

Gert-Jan de Vos mailto:boosttestui@on.nl