Debugging j2se applications can be easily done using trace buttons. as Sasan has described.
If you are developing a Java EE or Java ME, then you application is running on a Application (or Web) Server or on a Java ME emulator.
so IDE is not running it, and can not simply debug the application while running.
because the container (Java EE Server, Java ME emulator) should be able to debug the application and netbeans need to know how to connected to that container and provide debugging.
Netbeans with mobility pack provides both capabilities and connectivity.