Home

Background

Case Studies

Testimonials

VSGuard Help

VSGuard download

VSGuard

VSGuard is an implementation of relative debugging for Microsoft's ® Visual Studio ® environment. VSGuard builds on the rich environment provided by Visual Studio, and adds relative debugging functionality seamlessly. Thus, users already familiar with Visual Studio only need to learn a few new commands and concepts to make full use of VSGuard.

Visual Studio allows users to manage two different projects concurrently by building them into a Solution. If you are porting from Visual Basic 6.0 to Visual Basic .NET, VSGuard provides a Wizard that makes it very easy and quick to build two different projects into one Solution. From this point, VSGuard allows you to build assertions between data structures in the two projects. It will run them concurrently, and compare data automatically, reporting differences they occur.

Using this approach, you can test whether a new project performs the same tasks as a previous version, and if it doesn't, you can debug it using VSGuard's powerful assertion mechanism. VSGuard builds on the already powerful techniques used in other test tools, but allows you to trace errors down to an individual source line. What's more, you don't need to capture large trace files, saving both space and time.

Assertions between programs

Adding an assertion between projects is as simple as invoking VSGuard. The control panel shown below appears. An assertion describes locations in the two processes where the user assumes that key data structures should be identical.

Once the dialogue box has appeared, you can add assertions by:

  • Right clicking on a variable in either project source file.
  • Select Add To Assert on the pop up context menu. This brings up a half filled Edit Assert form, as shown below. The left hand side of the form (Target 1) now describes the location at which you decided to create an assertion.
  • Without closing the ‘Edit Assert’ window, perform the same ‘right click -> Add To Assert’ operation on same location within the other project. The other half of the ‘Edit Assert’ window should fill with information (if it doesn’t, then you may be performing the right click on the same project twice). The ‘Edit Assert’ window is now filled with information describing the assertion (see figure below).

Reporting differences

VSGuard reports differences as they are detected, avoiding the need for confusing post mortem reports and logs. The following screen shows that the variable "count" in two different projects was the same on the first 12 iterations of a loop, and then differed. At that point, VSGuard halted the execution and allowed the user to locate the fault using normal Visual Studio functionality. It couldn't be much easier!

How it works

Figure 1 shows a simplified schematic view of the architecture of VSGuard under Microsoft's Visual Studio ® .NET. Visual Studio .NET is build around a core ‘shell’ with functionality being provided by commands that are implemented by a set of ‘packages’ These packages are conventional COM objects that are activated as a result of user interaction (such as menu selection) within Visual Studio .NET, and also when various asynchronous events occur. This component architecture makes it possible to integrate new functionality into the environment by loading additional packages.

Figure 1 – Guard Architecture

Figure 2 – Sample screen dump of VSGuard within Visual Studio

 

 

Home | About | VSGuard | EclispeGuard | Contact | Privacy