Jump to content
  • entries
    945
  • comments
    5,899
  • views
    930,327

System Hooks Are Your Friend


Josh

2,143 views

 Share

Here's an example of how setting a debug hook in Leadwerks3D from a BlitzMax program saved me a lot of time stepping through code to figure out where something went wrong. When the engine encounters a fatal error, the hook is called, giving control back to the main program.

blogentry-1-0-72592700-1338747859_thumb.png

 

I can even step through the BlitzMax debugger and see which call to Leadwerks3D produced the error:

blogentry-1-0-14761300-1338747877_thumb.png

 

And it works with all supported languages. Little things like this make programming with Leadwerks3D very enjoyable.

  • Upvote 3
 Share

3 Comments


Recommended Comments

That's great. Will make debugging much easier. Especially with the data driven design stuff because often you will get crashes that are caused by bad info in the database rather than the code and it takes a long time to identify that that is the case.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...