ICD3Err0040: The target device is not ready for debugging.
Please check your configuration bit settings and program
the device before proceeding.
解決辦法:在這裡勾 選:Debugger>ICD3 Settings>Program Memory>Automatically 的 “Program after successful build”項即可在每次成功後自動下載代碼到Flash並進入調試就緒模式。