Debugging Using Visual Studio Debugger

Glossary Item Box

Microsoft Robotics Developer Studio Send feedback on this topic

Debugging Using Visual Studio Debugger

Visual Studio Editions, including the Visual Studio Express, can be used to debug Decentralized Software Services (DSS) services through the Visual Studio Debugger. Once the programmer has created a DSS service project, the project can be opened using Visual Studio. See Creating DSS Service Projects.  At this point a debugging session as described below can be initiated.

Setting Debug Breakpoints

Debug breakpoints are places in the code where the programmer wants the debugger to stop execution and return control so that variables etc., can be inspected and debug the code. Debug breakpoints are set by selecting the line the programmer wants a break in, and pressing F9. The programmer may also select Debug / Toggle Breakpoint.

Visual Studio Debug Breakpoint

Starting a DSS Node in Debugging Mode

Before starting the debugger the programmer can inspect the command line arguments to pass to DSS Host Tool (DssHost.exe) by opening the Debug tab under Project Properties. By default, when creating a new service project, the parameters are similar to the ones shown in the screen shot below.

Visual Studio Express Debug Properties

When the programmer is satisfied with the settings they can press F5. The Debug / Start Debugging menu item may be selected in order to start a debugging session. By configuring the DSS Debug and Trace Messages you can control the amount of information that the runtime writes to the output window. When a debug break point is hit the program execution is suspended and control handed to the debugger.

Bb483011.hs-note(en-us,MSDN.10).gif Multiple DSS nodes can be debugged simultaneously by starting multiple versions of the Visual Studio debugger.

Attaching to a Running DSS Node

If a DSS node is already running, the Visual Studio debugger can be attached to the running process. This enables debugging sessions of processes that were started outside the debugger.

Bb483011.hs-note(en-us,MSDN.10).gif The Attach to Process debugging feature is not available in Visual Studio Express editions.

To attach to a process, open the Attach to Process window by clicking on Debug / Attach to Process. Then select DssHost to debug and click on Attach.

 

 

© 2012 Microsoft Corporation. All Rights Reserved.