Content originally posted in LPCWare by lpcxpresso-support on Tue Jun 16 08:17:16 MST 2015
I should point out that if you are debugging, you do not need to erase the target flash. Just boot your target into ISP mode, and then the debugger will connect.
As the FAQ says, there are certain things your code can do (such as incorrectly setup the clock) so that NO debugger will be able to connect. However, with ISP mode, the chip is reset, the on-chip (ROM) bootloader is run, and your application is NOT run. At this point any debugger will be able to connect, without you having to erase your (bad) application from the flash. The debugger can download a new application, or, if you are trying to figure out what went wrong, you can debug the application.