I am using an MKE04Z1284 mcu. I have a program that I wrote to try and get SPI coms working between it and another processor. The MKE04 is a slave fyi. The code right now runs all the init functions, then it turns a gpio on to flag to the other processor it wants to send a message via spi. Just before it does that, it runs the function "SPI_SlaveTransferNonBlocking" to load up the spi register for the incoming clock signals from the master to get the byte. This causes SPI1_DriverIRQHandler to go off. When it does this the program halts at SPI1_DriverIRQHandler and does not continue unless I press the pause debugger button and manually step it through. Even stranger it seems to do this for literally every function in the custom spi send function I have because spi interrupts keep going off throughout the function. This is causing it to be impossible to debug. It wasn't doing this previously and I have no idea what I could have done to cause it and I have spent hours researching this and haven't gotten anywhere.
Other notes: There are no breakpoints at all. I have tried both PEMicro and JLinks. Also have restarted the pc, restarted the program, rebuilt, cleaned, restarted the debugger interfaces etc..
If I build it as release and use the flash programmer to program on the release version it runs perfectly fine with no halting.
I have attached the project.