Debugging, stacktrace output

BlitzMax Forums/BlitzMax Beginners Area/Debugging, stacktrace output

Well, I have currently written one for my own BMax IDE, but the code is in VB.Net. But I could give you a short summary on how BMax handles the stacktrace:

Step 1:
You have to get the process of you executable. Then you have to write "t" to the process Inputstream. Now the Stcktrace starts and you will get an output like this:
~>Stacktrace
~>Function YourAppname
~>Global A:Int=10
~>Global Test:TTest=$00232d80
etc.
the output is buffered in the process errorstream and you have to handle the output by yourself with err.Readline().
The Keyword 'Function' shows you which scope the following lines are belonging to.
Step 2:
You have noticed the line ~>Global Test:TTest=$00232d80?
Now, to receive full detail on this object, you have to dump this object. The Address is the value behind the = . To achieve this you have to write "d"+the address(without $) to the inputstream. And handle this the same way as the output from the stacktrace.

I hope this will help you. Maybe you should take a look to the Process module source and the Maxide source.

klepto2