Manifold System Debugger

The Manifold Debugger provides an integrated debugger for use when scripting in Manifold System using ActiveX languages.  All Manifold System editions include the Manifold Debugger together with the ability to write and execute scripts using a built-in script editor and forms environment. 

The Debugger provides the ability to stop, pause and restart scripts automatically at user-specified breakpoints, to see the value of any variable or execution context, to see the execution status within the call stack and to jump into, over or through subroutines, and to see the value of any user-specified programming expression in the Watches pane.  Programs can be paused, the value of variables changed and then programs restarted using the new values.

No need to buy anything extra!  All Manifold System editions include the Debugger!

Key Benefits

Professional Code Warrior Tools

A debugger is a specialized execution environment within which programs (like Manifold scripts) may be run in a controlled way that helps debug those programs. When a script is running under the control of a debugger it may be started and stopped, paused, re-started at a different location in the code, automatically stopped whenever it reaches a marked breakpoint and so on. At any time when a program is paused or stopped we can see what are the values of any variables or other information we would like to know.

To understand what a debugger does, let's take a moment to consider the old-fashioned way of writing and debugging programs. Traditionally, we can write a program that consists of one or more functions. If it works the first time without any flaws we're somewhat surprised but happy. More frequently a new program of any complexity will not work quite right the first time or it will exhibit unexpected behavior (a "bug") when it functions. To track down any problems we have to know what is going on inside the program as it executes.

The traditional way of finding out what a program is doing while it is executing is to insert additional lines of code for debugging purposes. For example, if we are not sure that the program reaches a particular function correctly we might insert a few lines of code that when that function is reached will print out some text like "Got to AddNextRecord() OK" or which might print out the values of variables that we suspect are being mishandled with printed output like "Executing LoopRecord with RecordNum = 36".

As any professional programmer knows, it's really tedious to lard up one's code with lots of extra debugging statements. Adding extra statements is slow and there is always the risk of forgetting some debugging statements within production code or of inadvertently changing the execution of a program by the debugging code.

A much faster way to debug code is to use a debugger like the Manifold debugger. The Manifold debugger takes advantage of features built into Microsoft's Active X scripting environment to provide sophisticated, professional-class debugging capability.

To stop the execution of a program at any given location, insert a breakpoint at that spot using the Edit Breakpoints command. Whenever program flow reaches a breakpoint the program will pause at that point. We can then see the contents of any variables using the Variables pane. If we like, we can even change the content of any variable by changing it's value in the the Variables pane.

The tools toolbar allows us to control program flow within the script. Using the Call Stack pane we can even jump to different parts of the script. The Watches pane allows us to see variables, process parameters and even computed expressions. All together the ensemble of debugger tools toolbar commands and the Call Stack, Variables and Watches panes allow us to control and examine the execution of a script with much greater convenience and flexibility than is possible using traditional methods.

The debugger works together with the Call Stack, Variables and Watches panes and is controlled by the Tools Toolbar configured with debugger commands when a script is open. The Edit Breakpoints command is used to set breakpoints for use with the debugger.

The Debugger Toolbar

If the Debugger is installed, when a script has the focus the tools toolbar will have debugger commands enabled. The debugger helps us develop and debug scripts in the scripting language of our choice. Commands will be enabled in the debugger toolbar as make sense given the execution state of the script.

Run

Run a script.

Run under Debugger

Run a script under control of the debugger.

Pause

Pause execution of a script.

Stop

Stop execution of a script.

Step Over

Step over a routine.

Step Into

Step into a routine.

Step Out

Step out of a routine.

The Call Stack Pane

The Call Stack pane is enabled when the Debugger is installed. The debugger is included within Professional and higher editions of Manifold. Users who have Personal Edition will not be able to use the Call Stack pane.

The Call Stack pane is used to display and manage the scripting engine's function call stack. It is used to debug scripts under the control of the debugger. Each row in the Call Stack pane shows a call to a subroutine, which could be in the same script or in a different script.   The Call Stack pane toolbar includes the following commands:

Go To - Enabled when a call within the Call Stack pane is highlighted. Go to that call. Double-clicking a line within the Call Stack pane is a shortcut to Go To that call.

Show Module - Press in to show module (script) names for each call.

Show Line - Press in to show the line number for that call within the module.

Show Line Position - Press in to show the position within the line for that call. Useful when there is more than one call on the same line.

Show Language - Press in to show the language used for each module.

For example, suppose we've stopped execution in a script called A at a breakpoint where another script is run.

With all of the Show buttons pressed in, the Call Stack pane will report the following values:

If we click on the single call line shown within the Call Stack pane we can enable the Go To button. This is not particularly useful in such a simple example (since we are already at that call) but when the Call Stack pane shows many calls we can click on any of them to highlight it and to jump execution to that call.

The Variables Pane

The Variables pane is enabled when the Debugger is installed. The debugger is included within Professional and higher editions of Manifold. Users who have Personal Edition will not be able to use the Variables pane.

The Variables pane shows the value of variables within scripts as they are executed together with information about the context in which those variables appear. It may also be used to change the value of variables for debugging purposes. Variables are shown within a hierarchical tree diagram.

Show Type - Press in to show the type of the variable.

Show Common Properties - Press in to show the Application and Parent properties that are common to all Manifold objects.

For example, suppose we've stopped execution in a script called A at a breakpoint where another script is run.

With both Show buttons pressed in, the Variables pane will report the following values:

Note that for either of the top hierchical levels (components or anotherScript) we can expand the hierarchy to see the Application and Parent properties, to expand those properties and so on.

The Watches Pane

Watches are one-line dynamic instruments that watch and report upon values of variables in scripts or other process parameters. They are used to debug scripts by presenting watched-for conditions.

Watches are user-defined expressions that dynamically report on the behavior of a variable or expression. Watch expressions may be a variable, a property, a function call or any valid expression (using arithmetic, for example) within the scripting language in use. The difference between Watches and values reported in the Variables pane is that the Variables pane reports values of variables used within the scripts, while a watch can be any programmatic expression.  For example, we may have a "count" variable used in a loop but we might also be interested in what the values of count + 3 is at any time.  The Variables pane can give us the value of count while a watch consisting of the expression count + 3 will give us the value of count plus 3.   Normally, of course, watches use more sophisticated expressions than simply adding a small number.

Watches are automatically updated during debugger commands. They will display the value of an expression within a given context and are a great way of monitoring what's going on in the script. In earlier days, one would have to insert short printing statements to print out different expressions as the code executed. In modern times, we can just use a watch to report those values "on the fly" within the Watches pane.

New Watch - Create a new watch. Double-clicking onto the next blank line in the Watches pane is a shortcut for creating a new watch. Double-clicking onto an existing watch is a shortcut for editing it.

Delete Watch - Deletes the highlighted watch from the pane. Highlighting a watch and pressing the Delete key will delete it.

Show Type - Press in to show the type of the variable.

Show Common Properties - Press in to show the Application and Parent properties that are common to all Manifold objects.

Double-clicking a watch or highlighting it and pressing the F2 key will edit its value.

Example

Suppose we've stopped execution in a script called A at a breakpoint where another script is run.

We've added two new watches to the pane. One watch was created using the expression "components" and the other was created using the expression "components.Count + 1".

With both Show buttons pressed in, the Watches pane will report the following values:

The components watch has been expanded. We could furrther expand the hierarchy to see the Application and Parent properties, to expand those properties and so on. We can see that the Count property for the components object has a value of 2.

The components.Count + 1 expression evaluates to a value of 3.  This shows the number of components in our project plus one.

Buy Now ! 

A Steal at Twice the Price! - Manifold System Personal Edition (which includes the Manifold Debugger) is priced at only $245: that's the best deal ever in GIS!   The data alone on the Manifold DVD sells for hundreds of dollars from other vendors.   Plus, the spectacular image manipulation, surface and 3D terrain, spatial, networking, and topological commands included in Manifold System often sell for thousands of dollars from other vendors.  Finally, the Manifold Internet Map Server built into Manifold System (Professional Edition and higher)  easily outperforms other map servers that sell for thousands of dollars. Dynamic debuggers like the Manifold Debugger often sell for the cost of Manifold System, yet Personal Edition delivers both the world's coolest GIS and the debugger for only $245!  

Visit the Manifold.net Online Store to buy a copy right now!

Home Page - Products - Search - Support - Shopping - News - Online Store
Personal Mapping - GIS - Database Commander - 3D View Studio - Maps and Data
Testimonials - Y2K - Links - Licensing - Privacy Statement - Terms Of Use


© 200
7 CDA International Ltd. All Rights Reserved.
Manifold is a Registered Trademark of CDA

Prices, terms and conditions, and product specifications subject to change without notice.  Please contact Manifold Net with any special needs or requests.

Back to Manifold Home Page