How to read configuration bit register from PIC?
To avoid this ambiguity, you should embed the CONFIG register settings in your source code.  Then, when you compile your code, it embeds the settings into your hex file.

As you stated, you can view the Configuration Bits.  This is not to set them, however, as much as to assist you in formatting them for your code. Once you select what you want, click where it says "Generate Source Code":



It will give you formatted #pragma statements that you can copy directly into your source files:



Put these statements in the source code, outside of any function.  I put mine at the top of my main.c file.

Good luck!