How to debug the asterisk?

Is there any way to use gdb or ddd to debug “asterisk” while it is running?

There’s some info reguarding that on this link.

voip-info.org/wiki-Asterisk+debugging

Perhaps it will help.

Dan