PIC mcu gets programmed but doesn't get executed
Check the configuration fuse options, that you are using the correct ones for your hardware. Specifically the clock type (internal rc, external crystal) etc matches your hardware because it sounds like the chip is not running.