Hi. I have given this a lot of thought. All attempts here at starting should be with full throttle. After 2 seconds of turning over, back off the throttle while continuing to turn over for another few seconds, then continue 2 seconds with no throttle, just to be sure. Push in the clutch pedal for all starts to reduce the load on the starter - don't use the clutch bypas switch.
If the engine starts, quickly release the throttle to avoid revving a cold engine. Never rev an engine that is below normal temperature to above 2500 rpm and idle at no more than 2000 rpm.
After a few attempts to start, smell the exhaust for raw gas or starting fluid. If no gas smell then keep fuel as the problem on your mind.
This here is what I know by memory and may vary from the Xterra manufacturing manual which has a fully detailed procedure.
Considering the car died while driving it seems more like an electrical problem than a mechanical problem. Best to keep the car jumped while starting. Keep the car battery charged. Connect a volt meter TO THE BATTERY you can watch while starting. The voltage should stay >9 volts while cranking.
0. If the voltage drops below that then replace the battery and retry starting. If it starts and runs normally then check the alternator. The voltage should be >14 volts while the engine is running (and not jumped to another battery).
1. Look at the fuses for engine control, fuel, ignition - 5 minutes to do. Check the region around the exhaust leak and make sure nothing was cooked - 5 minutes to do. Check all of the wiring under the hood for loose, burnt or rubbed/stripped wiring - 5 minutes to do. While checking, smell for burnt smells.
2. Pull the engine codes to make sure there are no others. Note the codes then clear all codes.
2a. Other possibilities are a relay is malfunctioning, a sensor is malfunctioning such as crackshaft sensor or camshaft sensor; a problem in the wiring harness, the computer is broken; the timing chain is damaged; the variable valve timing is malfunctioning. Consider either testing relays or following the mechanical tests below which will also test the relays.
The following are mechanical tests in case the electrical checks out. I assume the spark plug gap is correct and there is irridium on the center electrode.
3. Take the gas cap off and smell the gas. There should be no sweet smell, just raw gas. Sometimes it smells a little putrid.
4a. Check the radiator water levels and color, both the over flow tank and the radiator. If either are low or the water has changed color, then keep blown head gasket or oil cooler leak on your mind. If either are low then put the radiator cap back on and clamp the line to the overflow tank to minimize sucking water into the engine. Remove the clamp after testing.
5. Check the engine oil for water. It would look muddy (emolsified) unless the car has sat for awhile, then the water may settle out to the bottom of the pan. Smell the oil. It should smell like exhaust, not burnt. There should be no visible particles and no variations in the look of the oil on the dip stick.
6. Open the air filter box and prop it open then try starting. If the engine runs normally, then shut it down to avoid running with no air filtration and check the air inlet and filter are clear.
7. With the air filter box open, spray starting fluid in the inlet and try starting. Spray fluid again and try starting. If it kicks or starts then dies then fuel is likely the problem. In this case, check power to the fuel pump during starting, then check pressure. Smell the exhaust for starting fluid - it should pass through. If no smell then keep the air intake/exhaust on your mind.
8. Then check spark. If no spark, check the relay. Check the plugs you can get to: All of the ignition coils should not have failed simultaneously.
9. Pull a plug. If dry then check another plug to be sure. If dry, then fuel is likely the problem. See online pictures to read the plugs.
10. Are the plug(s) wet like with water or are they wet with oil? If like oil then the plugs may be oil fouled. Research what to do in this case b/c it's a whole issue of its own.
11. If plugs are wet with gas then air flow intake or exhaust must be the problem. Try a compression test. Poor compression can be caused by several things, most requiring taking the engine apart and is another issue to research.
12. Another thing to try is pull all of the plugs and inspect the plugs and the intake since the intake has to be removed. A little oil in the intake passages is normal, from the PVC system.
13. If the car tries to start but dies, consider a plugged exhaust. Try breaking the exhaust before the catalytic converters and try starting. You can remove the headers if that is easier. Just don't run the engine longer than necessary to verify you found the problem. WARNING: it will be very loud if it starts so wear hearing protection and consider your neighbors.
Beyond this checking gets a lot more complicated. Hope this helps.