About that literal 5: what the project, that sub, should usually care about is the last call; it is therefore necessary to understand whether the stack is FIFO or LIFO, whether the zero index or StackTrace.Length -1 should be used and also be able to empty the stack.
???
DEBUG MODE - After pausing the app and resumed it:
Called from Class: anywheresoftware.b4a.shell.Shell
Method: runMethod
Line: 732
StackTrace length 33
0 dalvik.system.VMStack getThreadStackTrace
1 java.lang.Thread getStackTrace
2 java.lang.reflect.Method invoke
3 anywheresoftware.b4j.object.JavaObject RunMethod
4 java.lang.reflect.Method invoke
5 anywheresoftware.b4a.shell.Shell runMethod
6 anywheresoftware.b4a.shell.Shell raiseEventImpl
7 anywheresoftware.b4a.shell.Shell raiseEvent
8 java.lang.reflect.Method invoke
9 anywheresoftware.b4a.ShellBA raiseEvent2
10 anywheresoftware.b4a.debug.Debug delegate
11 b4a.example.classb _logcaller
12 b4a.example.classb _somefunction
13 b4a.example.classa _somefunctionina
14 b4a.example.main _button1_click
15 java.lang.reflect.Method invoke
16 anywheresoftware.b4a.shell.Shell runMethod
17 anywheresoftware.b4a.shell.Shell raiseEventImpl
18 anywheresoftware.b4a.shell.Shell raiseEvent
19 java.lang.reflect.Method invoke
20 anywheresoftware.b4a.ShellBA raiseEvent2
21 anywheresoftware.b4a.BA raiseEvent2
22 anywheresoftware.b4a.BA raiseEvent
23 anywheresoftware.b4a.objects.ViewWrapper$1 onClick
24 android.view.View performClick
25 android.view.View$PerformClick run
26 android.os.Handler handleCallback
27 android.os.Handler dispatchMessage
28 android.os.Looper loop
29 android.app.ActivityThread main
30 java.lang.reflect.Method invoke
31 com.android.internal.os.Zygote$MethodAndArgsCaller run
32 com.android.internal.os.ZygoteInit main
DEBUG MODE - WITHOUT pausing the app:
Called from Class: b4a.example.classb
Method: _somefunction
Line: 57
StackTrace length 26
0 dalvik.system.VMStack getThreadStackTrace
1 java.lang.Thread getStackTrace
2 java.lang.reflect.Method invoke
3 anywheresoftware.b4j.object.JavaObject RunMethod
4 b4a.example.classb _logcaller
5 b4a.example.classb _somefunction
6 b4a.example.classa _somefunctionina
7 b4a.example.main _button1_click
8 java.lang.reflect.Method invoke
9 anywheresoftware.b4a.shell.Shell runMethod
10 anywheresoftware.b4a.shell.Shell raiseEventImpl
11 anywheresoftware.b4a.shell.Shell raiseEvent
12 java.lang.reflect.Method invoke
13 anywheresoftware.b4a.ShellBA raiseEvent2
14 anywheresoftware.b4a.BA raiseEvent2
15 anywheresoftware.b4a.BA raiseEvent
16 anywheresoftware.b4a.objects.ViewWrapper$1 onClick
17 android.view.View performClick
18 android.view.View$PerformClick run
19 android.os.Handler handleCallback
20 android.os.Handler dispatchMessage
21 android.os.Looper loop
22 android.app.ActivityThread main
23 java.lang.reflect.Method invoke
24 com.android.internal.os.Zygote$MethodAndArgsCaller run
25 com.android.internal.os.ZygoteInit main