Code: Select all
DebuggerError(Message$ [, StepsOut])
DebuggerWarning(Message$ [, StepsOut])
However, when I create a Module (or an include file) using this functions to send a warning or error message because of an runtime issue in a module's procedure, I would like to automatically step out one (or more) calling steps to highlight the error at the position where the module procedure is called, not where DebuggerWarning is called.
Current work-around: viewtopic.php?p=651468#p651468 posted by freak
- Current behavior: Highlighted line inside the procedure, always on line 3.
Not helpful for the person working with this procedure.Code: Select all
Procedure SomeProcedure(Param1.i) If Param1 <= 0 DebuggerWarning("Param1 should be positive, but it was "+Param1) ; Highlighted EndIf EndProcedure SomeProcedure(1) SomeProcedure(0) SomeProcedure(99) SomeProcedure(-100)[21:30:35] Executable started.
[21:30:35] [WARNING] testi.pb (Line: 3)
[21:30:35] [WARNING] Param1 should be positive, but it was 0
[21:30:35] [WARNING] testi.pb (Line: 3)
[21:30:35] [WARNING] Param1 should be positive, but it was -100
[21:30:35] The Program execution has finished. - Wished behavior: Highlighted line at call position, i.e. line 8 and line 10.
The person working with this procedure knows exactly at which call the issue occurred.Code: Select all
Procedure SomeProcedure(Param1.i) If Param1 <= 0 DebuggerWarning("Param1 should be positive, but it was "+Param1, 1) ; Optional parameter lead to a step out. EndIf EndProcedure SomeProcedure(1) SomeProcedure(0) ; Highlighted SomeProcedure(99) SomeProcedure(-100) ; Highlighted[21:30:35] Executable started.
[21:30:35] [WARNING] testi.pb (Line: 8)
[21:30:35] [WARNING] Param1 should be positive, but it was 0
[21:30:35] [WARNING] testi.pb (Line: 10)
[21:30:35] [WARNING] Param1 should be positive, but it was -100
[21:30:35] The Program execution has finished.

