Do you have any other pragma config lines in your code?
If not, it sounds like your PIC isn't even booting up correctly without a proper config to match the board.
(if you haven't explicitly set a clock source, it will be in the default "EC oscillator" mode, which is an external clock signal on the OSC1 pin... which means your crystal isn't being driven, and there is no clock for the PIC to run on!)
You need them to configure clock source and many other things. Looking at your board it has an external crystal for clocking.
Read page 63 onwards of this for the 18F2550:
http://ww1.microchip.com/downloads/en/DeviceDoc/51537a.pdfYou need to add all the relevant configs for your setup.
Look at the markings on the crystal, and work out what you need to divide it by to get 4Mhz. Then set the PLL prescaler appropriately. (ex. 20MHz marking, needs DIV by 5 to get 4mhz)
CPUDIV = OSC1_PLL2 will give you 48MHz clock speed (12million instructions per second)
FOSC = HSPLL_HS sets the clock source to be external crystal, which also drives the PLL (to get 96MHz). Previous config (OSC1_PLL2) divides 96MHz by 2 to get ur system clock
The rest of the configs aren't as important and you can find out what they do in the data sheet.