Thank you for fixing Param handed IN to trigger debug, BUT you cannot SET a value to a NEW.xxx column in a before update trigger, and debug it. It is an unknown variable. and it causes the usual lockup after that as described elsewhere.
I have not tried all permutations and combinations of NEW. and OLD. in all types of trigger for reasons of time... but I suspect it is not the only one that does not recognise SETting NEW and OLD column syntax.