OK, problem solved. On my MicroCode Studio Plus it was showing the In Circuit Debug (ICD) toolbar. I was pressing ICD compile and program button instead of the normal compile and debug button. Now everything is working 100%.

Thanks to all of you for your kind help.

Javier.