Q:

How to discretize a GBM under P- and Q-measures?

Under the P-measure, a geometric Brownian motion can be specified using the following SDE:
$$dS_t=\mu S_tdt+\sigma S_tdW_t^P$$
and its Euler discretization is
$$S_{t+\Delta t}=S_t + \mu S_t \Delta t + \sigma S_t \sigma \sqrt{\Delta t}Zt$$
Under the Q-measure, should the drift $\mu$ be substituted by $r$ or by $r-\frac{\sigma^2}{2}$?

A:

$r-\frac{\sigma^2}{2}$ for the drift only applies to the log-returns. The Euler discretisation simply discretises the SDE directly. You'd use the risk-free rate 
for you drift under the risk-neutral measure for your question.
For your reference:

Please read the wikipedia for more details.

