Hi,
I was fighting with it longer than acceptable so I created my own project where port B is connected to the ECT Ch0 IC function.
(Two days I spent with wrong multilink cable ... frustrating to find hidden and random behavior issue)
I am able to get into the interrupt. The code is very simple so now there is a game "find ten differences" :). I hope you will be successful than me. However, I have not checked your code after my started to run. Probably, with following suggestion it will also run. Additionally I set a pull down on ECT Ch0 (rising edge detection).
But !!!! one big issue (I forget because I usually used XGATE in flash) can be usage of RAM for XGATE. If you set breakpoint to it before the XGATE is initialized a copied then how it could now where it is?
Suggestion...set breakpoint at CPU somewhere after XGATE setup is done and code is copied. After the code stops at this brkpnt you can set another one in the XGATE window.
Another approach is to run the code, temporarily stop it, and then set a breakpoint into XGATE code.
Best regards,
Ladislav