With debug support enabled you can use arm-none-eabi-gdb (or gdb-multiarch) to debug the code used in the simulator.
Use arm-none-eabi-gdb with the .elf file as the parameter:
arm-none-eabi-gdb compiled_file.elfand the command below to connect (1234 is the default port):
target remote localhost:1234
Graphic debug mode can be made using eclipse IDE with Eclipse Embedded CDT.