stalls durring burnout...

so yea my integra runs and drives great all day every day but yesterday i just tried lighting the tires up a little and the check engine light went on and the car instantly died, wouldn't start for 2 minutes, then started and ran fine. I was pretty confused so later that night (stupidly) i tried a "mini" burnout and it had the same result. I am done with the burnouts and my car runs fine...so any ideas whats up? Thanks in advance!!

the light goes on as the car dies...then 20 seconds later when i start the car, it's fine so idk how i would pull the code while this happens (literally a 3 second or less event)...im cornfused...my friend thinks it's the distributor...we looked at it and one of the wires wasn't even on...fixed that, and it did it again...im sure it helped me putting the wire on but didn't solve the problem...today i raced some piece of shit jetta (and killed him) but the incident happened again...except while driving...i think i may have brushed the rev limiter...then it kinda all made sense...i think i've come to the conclusion that it has something to do with the rev limiter...but no clue what or how to fix it for that matter...