The amp puts out a signal on ONE output. Either the amp, or the headphones jack. You'd have to hack the hardware - You might be able to take it apart and do something to the jack, so it doesn't detect when a cord is plugged into it or something, so it'd continue playing thru the speaker while the line out is connected.
If you have another amp and a mixer, you might be able to do what I do: I run a POD directly into my mixer on one channel. I send it to an aux that's plugged into my amp. There's an sm57 on the amp, I plug it into my mixer on a different channel, so I can record the direct in AND the mic simultaneously. You could similarly plug your guitar right into the firebox and do something like that, but you'd be recording your dry guitar sound, not the guitar sound as the cube is playing it.
Another idea you could try is: record the direct in, then play it back thru your amp on an aux or whatever, and record with the mic. It's not 'simultaneous' but it could achieve the same results.