My dishwasher which is on a spur from the kitchen ring after some minutes will trip the main switch on the CU. However running the dishwasher on the ring from an extension plug works fine. The wiring in the sockets seems fine. How can I check the spur cable if that is where the problem lies as it seems it must
Just guessing from the information you provided:
If there is a partial ground in your dishwasher wiring it can draw enough current to trip the breaker.
When you run it through the extension cord it adds enough resistance to limit the current so it doesn't trip the breaker.
I would suspect if it is an older machine the motor is leaking current through the insulation on the windings.
It may be time for a new one but double check the wiring just in case.