Visual Debugging Hooks Into Your Applications

April 9, 2009
Text-based programming has led to a host of text-based debugging tools, from command-line interface debuggers to graphical integrated development environments (IDEs) that are still essentially text-based. Arrays and structures may be dis

Text-based programming has led to a host of text-based debugging tools, from command-line interface debuggers to graphical integrated development environments (IDEs) that are still essentially text-based. Arrays and structures may be displayed in windows, but they’re textbased at heart. This isn’t to say that graphics have been completely ignored, though. DSP data can be plotted with tools like Analog Devices’ VisualDSP+ and Texas Instruments’ Code Composer Studio.

TRACING BUGS
Graphics presentation comes into play in presenting and analyzing trace results. Express Logic’s TraceX provides realtime analysis of system events and context switching that can help identify problem areas, deadlock, and race conditions more easily than relying on breakpoints and print statements (Fig. 1). It also can hook into application programming interface (API) calls without requiring debug versions of an application.

Green Hills Software’s TimeMachine provides this type of graphical trace facility as well, but it also adds the ability to step forward and backward through the code that is trace-setting virtual breakpoint and performing path analysis using the Path- Analyzer tool. TimeMachine works with hardware trace systems, and TraceEdge provides software support for devices without integrated trace hardware.

DRAW YOUR OWN CONCLUSIONS Better presentation of internal application information in real time often can be accomplished by turning to the graphical interfaces that most applications present to a user, including controls like buttons and sliders. Developers could do this, and they frequently do so for applications that provide a graphical user interface (GUI). The task is often daunting, though, for what are often considered “simple” debugging chores. Still, there are significant benefits to having better debugging tools.

This is where tools like Micrium’s uC/ Probe comes to the rescue (Fig. 2). It allows the easy creation of a user interface and linkage between the controls and internal application functions and data structures. It also lets developers choose the kind of display that best suits the data, and it does so without major modification of the application.

PART OF THE VISUAL PLAN Tools like uC/Probe are starting to bring facilities that National Instruments’ Lab- VIEW have known for quite a while (Fig. 3). LabVIEW combines a graphical programming window with a matching user interface window where program objects are automatically linked to controls on the user interface window.

Developers benefit from LabVIEW’s default static definition of virtual instruments (VIs), providing a one-to-one relationship between the VI code and user interface. This tends to make a similar approach for languages like C/C++ and Java a little more challenging but not impossible, as NI’s object-oriented enhancements to LabVIEW have shown as well as tools like uC/Probe that target C/C++.

EXPRESS LOGICwww.rtos.comMICRIUMwww.micrium.comNATIONAL INSTRUMENTSwww.ni.com

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!