Should I hang doors before or after drywall?
There's a huge amount of mess and potential for damage during the hanging, taping, and painting stages. You wouldn't want some of your most expensive and vulnerable woodwork hanging around through that. 

Also, the hangers will likely use rotary cutters to zip around door openings. You make that much harder for them if even bare jambs are in place (and again increase the chance of saw or knife damage). 

Then, there's a huge amount of moisture in the air during taping and painting. You don't really want your woodwork in the building at that time due to the chance of warpage and joint movement after installation.

Finally, you want to hang your doors with respect to the finished face of the walls. Sometimes slight misalignment of framing, heavy tape joints, and other variance means that you'd shift the jamb slightly from center of the wall for a better outcome. 

Hang the doors after painting, after hard flooring, and before carpeting. There are no pros to hanging doors before drywall.