store debug data using a local variable #1239

this may solve #1239