Debug: Boolean;
The Debug property returns whether a development environment object is executed with debugging.
Available values:
True. The development environment object is executed with debugging.
False. The development environment object is executed without debugging.
For details see the Running and Debugging Development Environment Objects section.
Executing the example requires that the repository contains a unit with the MODULE identifier. The following code is added in the unit:
Class A: Object
Public a: Integer;
Public b: String;
End Class A;
Sub Test(obj: A);
Begin
Debug.WriteLine(obj.a);
Debug.WriteLine(obj.b);
End Sub Test;
Add links to the Fore, Metabase system assemblies.
Sub UserProc;
Var
ForeService: IForeServices;
Runtime: IForeRuntime;
Assm: IForeAssembly;
FClass: IForeClass;
ClassInst: IForeObject;
Begin
ForeService := MetabaseClass.Active As IForeServices;
Runtime := ForeService.GetRuntime;
// Load unit
Assm := Runtime.BindToAssembly("MODULE");
// Get unit class
FClass := Assm.BindToClass("A");
// Create a class instance
ClassInst := FClass.CreateObject;
// Display in the console whether unit is executed with debugging
If ClassInst.Debug = True Then
Debug.WriteLine("Executed with debugging");
Else
Debug.WriteLine("Executed without debugging");
End If;
End Sub UserProc;
After executing the example the specified unit is loaded to the development environment. The console displays the message about unit execution with or without debugging.
See also: