The requirements to use the PicKit 2 to program the device are a lot less than those to have the device run. For example, the programming side of things does not require the oscillator to be working.
Does the tool that you use to write the code and program the device allow you to debug the code? If so, you can do a debug build and see if you can connect with that - this DOES require an oscillator of some sort within the chip to communicate between the IDE and the chip.
If that works then you know that an oscillator can be configure to run. Then you need to look at which one is used as power-up - the appropriate config settings will tell you that.
If you alter the oscillator settings in your code, then you shoudl be able to step through the code to see if the code is working after the oscillator has been reset. Again, it will be necessary to see your code to check of that is working correctly.
If all of that works then there could still be a lot of other problems but without the code it is really hard to tell.
Susan