I don't normally do this, so it took a little hunting, but on the command line, try this:
tesseract input output -c tessedit_write_images=1
You can also use a config file and pass that as the last item on the command line:
tesseract input output ~/tessconfig
where ~/.tessconfig is a file whose contents are simply: