as you said: simply start JBoss in debugging mode.
i always do with the suspend flag set to "no" and then attach to the jboss-vm after deployment of the ear-file.
the vm willstop for every breakpoint that you have set in your sourcecode.
for netbeans this is very simple. just mount the appropriate directories and set your breakpoints and start the remote debugging session.
beware that you should debug a server only if there's a single user on it. otherwise you will get a total mess.
You can also use Eclipse to attach to a running Jboss process and debug your ejbs/servlets.
Use the Genuitec JBoss plugin for Eclipse.
After you set it up and start JBoss from within Eclipse, you can simply compile the code in the project, deploy and set the breakpoints in the code.