I've had the very same problem. If it keeps cutting out when warm, then not starting immediately after (i.e. keeps turning over but not firing up) then it's most likely crank sensor.
It's a bit of a pain as the sensor is in a tight spot on the back of the engine block. Sensor only costs about £20 or so.
Took me about 45 mins. You'll need to remove the air intake pipe & throttle body. If you've got really skinny, flexible hands you should be able to go in from the top. The sensor is located on the back of the engine block, right on the edge between engine and gearbox. I'm not too sure which connector is the crank sensor now.
You do have the option of getting to it from underneath, but be warned - it's just as tight as from the top, but you have a better view on the sensor. It's only held in with 1 torx bolt.
When you're removing the sensor, make sure you remove the o-ring with it, otherwise you'll not get the new sensor to sit right back in and it will cause problems yet again.
The crank sensor is the Brown connector on the back left hand side of the engine as you look from the front. As above remove induction and throttle body and reach around back of block and its on the right hand side of the engine block. In my experience the hardest thing is removal of throttle body and induction as long as you are relatively flexible and don't mind lying over engine.