debugger: assign Environment to DebugContext too

fix #7517
Merge remote-tracking branch 'upstream/master'