Navigation:  Programming Cookbook > External Interfacing > External Callbacks >

Debugging Callbacks

Previous pageReturn to chapter overviewNext page

Callback blocks can be debugged in the normal manner by inserting a #halt method into the callback block (or any subsidiary method), or, if the callback is synchronous, by stepping into the external function which uses the callback.

The Dolphin VM serializes returns from all callbacks so that the returns match the order of entry and the C stack is correctly maintained. This can mean that a Debugger started after a previous debugging session may prevent the previous debugging session from unwinding past the callback entry point because it has to block until the later stack frame has been removed. Fortunately this happens rarely in practice and is perfectly safe even when it does. Closing the Debugger, which is holding things up will resume normal service.