Both DBPro and FM/FTP include several actions that execute NeoBook subroutines just like that so it should work for you.I'm just making neobook react to some event by playing GoSub "Subroutine", nothing unusual. And event may occur whenever it (user) wants.
For the debugger error, try looking at the debugger screen while your plug-in is running and see if the executed actions are being nested (indented to the right). For example:
Action 1
Action 2
Action 3
Action 4
This indicates that the actions are being called from inside the preceding action. Some of that is acceptable, but if it goes on indefinitely you will run out of resources. Meaning something may be keeping your subroutines from terminating properly.