Check connections coming from under the flywheel, there is a optical sensor by the flywheel that signals it to fire when the pads on the flywheel pass it that relate to the cylinders. If that sensor begins to degrade it could cause these symptoms. If you unplugged the main harness while it's running and it still did it, you've isolated all your issues to the motor it's self. Stator (under the flywheel) puts out AC current, which is converted to DC power from the voltage regulator. stator will provide your running electricity as well as charging power. While underway. If it should fail, in theory your motor should still operate for a few seconds from the battery it's self provided it has 12V, until it drops below; let's say 11.7V. Your ignition module, ECM, hp fuel pump, injectors, etc (everything required to run) has to have 12V constantly to operate. Good place to start, start the motor, grab a voltage gauge and start testing at the starter solenoid 1st. That's one of the first places your power is going to from the regulator. Should be around 12.8-13.4V while running at idle. Look for servere voltage drops. From there start testing voltage on the red wires (battery) and yellow (12v running) until you locate excactly what is losing power when it shuts down
I would get a Lisle 50850 spark tester, set the gap at 3/8 inch, do you have spark on any plug wires? This is a typical ignition problem .
CDI electronics. com explains it perfectly. Go to CDI type in your year, make, HP and what coil do I need, your coil will come up they have trouble shooting for all ignition parts, sometimes you don't need testing tools, always start testing the coil first, then power pack, trigger,then stator.
If you have EFI there is software to diagnose problems, and log maintance, costs 65 bucks for a Yamaha, Borrow a laptop or tablet, the cables included.
Ok, first you cannot test this engine like older two strokes. You have to have a harness plugged in because the ECM has to have power to work. You need a diagnostic computer to trouble shoot the engine. Otherwise you are just chasing your tail.
Software may show you a trouble code or a malfunctioning circuit, but more often than not it's not going to be that in depth. If the computer did record the failure on the individual part, you've still got to be crafty with a volt meter to properly diagnose the issue the rest of the way.