Hey
I would do it in your DAW unless it is at a necessary place WITHIN your effects chain and it is ABSOLUTELY NECESSARY to record the effected guitar within a specific environment, capturing the environmental ambience. In other words, very rarely!
Like any effect, once added it cannot be removed. Recording gives you the ability to completely change the sound of your recording. If you record the original with all it's dynamics you can change the effects you use. ie post recording flexibility.
The only caveat is if you have a very noisy recording system, where recording adds a lot of noise. Not ideal, but under that circumstance if you compress a noisily recorded guitar, far from ideal as that is, you would compound the problem by compressing the noisily recording as that would effectively raise the already loud noise floor. But that is only a consideration if your recording system is already noisy.
Cheers
John