Debugger: Make more tests pass in the presence of optimizations

Variables that we want to check should not be optimized out.

Change-Id: I8af633094674ff78b43b27756a662221b2c56e99
Reviewed-by: hjk <hjk121@nokiamail.com>