Page 1 of 1

Order procedure called

Posted: Sat Feb 14, 2026 12:27 pm
by Kwai chang caine
Hello at all

Does the PB IDE have a tool for see the order of procedures is called ?
A style of STACK of Procedures, not for memory, like this :idea:

Code: Select all

Declare One()
Declare Two()
Declare Three()
Declare Four()

Procedure Four()
 Debug "Procedure : Four()"
 Three()
EndProcedure

Procedure Three()
 Debug "Procedure : Three()"
 Two()
EndProcedure

Procedure Two()
 Debug "Procedure : Two()"
EndProcedure

Procedure One()
 Debug "Procedure : One()"
 Four()
EndProcedure

Debug "Order of procedures called"
One()
Have a good day

Re: Order procedure called

Posted: Sat Feb 14, 2026 12:48 pm
by Axolotl
So you're looking for a function similar to what Debugger | Callstack does at runtime?

Re: Order procedure called

Posted: Sat Feb 14, 2026 1:18 pm
by Kwai chang caine
I don't know, i not use CALLSTACK it's too much hard for the little head of KCC :oops:

Me i search since several years, not for always, but often, for see what is the path the code use during the first line, and also the procedure called, until the last line of code
But mainly the procedures calls, in fact is not for my codes, because it's me who have coded (Easy to recognize...it don't works :mrgreen:)

But when i want understand how a big and complex code of foreign programmer works, it's sometime very difficult to see the route and order of procedures calleds
The worst is the callback(), because you believe "Procedure 1" call "Procedure 2" but you don't see this devilish callback is inserted between the "Procedure 1" and "Procedure 2"
For the moment i do step by step, but sometime the program crash because it not want you stop the events during the loop :cry:
And also when you have a MsgBox and a callback impossible to know where is line of the MsgBox, when you stop it's always in the callback :twisted:
And also several example i not have in my memory, but with a tool who show to you

Code: Select all

Main => Procedure1 => CallBack => Procedure2 => Main
You see immediately what is the procedure you must to see or modify for have the result you want :idea:

Re: Order procedure called

Posted: Sat Feb 14, 2026 2:12 pm
by Kwai chang caine
And better when you put a Breakpoint, you know exactely what procedure is called since you running the application :idea: 8)
Obvioulsy, the more simple is to insert a "Debug #PB_Compiler_Procedure" in each procedure but it's not really easy to do if the code is very big :|