Stack Trace
BlitzMax Forums/BlitzMax Programming/Stack Trace
| ||
How can I get a stack trace when an exception is thrown? Thanks! |
| ||
To begin with, you will need to build/run your app in debug mode. Release apps do not contain stack debug information. If you are running it from the editor, it should highlight the line in your program source, and show a stacktrace in the Debug view. If you are not running it from the editor, you are screwed ;-) (well, no, that's not entirely true… but the built-in support for interacting with debug is limited outside of the editor.) |
| ||
ohhh :( Well, I'm releasing a beta version of my software and would like to have bug reporting. Would I always need the source code in order to do a stack trace? Thanks! |
| ||
No, debug mode doesn't require the source to be present. It's just something your Editor uses to highlight the line that is in the stacktrace. If you are running in debug outside of the editor, and you have a shell/console window available, you will see a tilde (~) appear. If you then type "h", it will display a list of interactive debugging commands that you can use. Not really suitable for end-users, though. Otherwise, if you really need such information available for a release binary, you'll need to implement your own logging, or perhaps use a third-party logger. |
| ||
Ok! Great input! Thanks a lot Brucey! :) |