Click or drag to resize

Debug Class

Provides a set of methods and properties that help debug your code.
Inheritance Hierarchy
SystemObject
  ABB.Robotics.DiagnosticsDebug

Namespace:  ABB.Robotics.Diagnostics
Assembly:  ABB.Robotics (in ABB.Robotics.dll) Version: 6.5.129.0
Syntax
C#
public abstract class Debug

The Debug type exposes the following members.

Constructors
  NameDescription
Protected methodDebug
Initializes a new instance of the Debug class
Top
Methods
  NameDescription
Public methodStatic memberCode exampleAssert(Boolean)
Checks for a condition and displays an assert message on the FlexPendant, containing a stack trace, if the condition is false. When the condition is false, the assert message, with a stack trace, is also sent out on the network. The message can be displayed in the controller console by enabling the functionality on the controller. Use fpcmd_enable_console_output to enable FlexPendant logging.
Public methodStatic memberCode exampleAssert(Boolean, String)
Checks for a condition and displays an assert message on the FlexPendant, containing a stack trace, if the condition is false. When the condition is false, the message, with a stack trace, is also sent out on the network. The message can be displayed in the controller console by enabling the functionality on the controller. Use fpcmd_enable_console_output to enable FlexPendant logging.
Public methodStatic memberCode exampleAssert(Boolean, String, String)
Checks for a condition and displays an assert message on the FlexPendant, with detailed information and a stack trace, if the condition is false. When the condition is false, the message, with detailed information and a stack trace, is also sent out on the network. The message can be displayed in the controller console by enabling the functionality on the controller. Use fpcmd_enable_console_output to enable FlexPendant logging.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodStatic memberCode exampleFail(String)
An error message, with a stack trace, is displayed on the FlexPendant. The error message, with a stack trace, is also sent out on the network. The error message can be displayed in the controller console by enabling the functionality on the controller. Use fpcmd_enable_console_output to enable FlexPendant logging.
Public methodStatic memberCode exampleFail(String, String)
An error message, with detailed error information and a stack trace, is displayed on the FlexPendant. The error message, with detailed error information and a stack trace, is also sent out on the network. The error message can be displayed in the controller console by enabling the functionality on the controller. Use fpcmd_enable_console_output to enable FlexPendant logging.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberCode exampleWrite
A debug message is sent out on the network. The message can be displayed in the controller console by enabling the functionality on the controller. Use fpcmd_enable_console_output to enable FlexPendant logging.
Public methodStatic memberCode exampleWriteIf
Checks for a condition and sends a debug message out on the network if the condition is true. The message can be displayed in the controller console by enabling the functionality on the controller. Use fpcmd_enable_console_output to enable FlexPendant logging.
Public methodStatic memberCode exampleWriteLine
A debug message is sent out on the network. The message can be displayed in the controller console by enabling the functionality on the controller. Use fpcmd_enable_console_output to enable FlexPendant logging.
Public methodStatic memberCode exampleWriteLineIf
Checks for a condition and sends a debug message out on the network if the condition is true. The message can be displayed in the controller console by enabling the functionality on the controller. Use fpcmd_enable_console_output to enable FlexPendant logging.
Top
Remarks
If you use methods in the Debug class to print debugging information and check your logic with assertions, you can make your code more robust without impacting the performance and code size of your shipping product. In Visual Studio .NET projects, creating a debug build enables Debug. For information on how to disable Debug, see the Visual Studio .NET documentation. In contrast, in Visual Studio .NET projects, Trace is enabled by default for both release and debug builds, so code is generated for all trace methods in both release and debug builds. Therefore, you can use Trace to instrument release builds.
Examples
This example displays and logs an error message.
Debug.Fail("Operation not allowed in current state", string.Format("state: {0}", myobj.State.ToString()));
See Also