Allow selection between debug and release modes

Change-Id: I4216412d0ab917ff6eea37c310ced88bbb445165