make debug=yes
The application directory is then created with a different name: debug is appended instead of app (again, this allows you to keep both the debug and not-debug versions at the same time). In the example, the application directory would be called PanelTest.debug.
To debug the application, use debugapp instead of openapp:
debugapp PanelTest.debugThis will run gdb (the GNU debugger) on the executable setting everything ready for debugging.