preserve existing whitespace to reduce noise in pull-request,
add logic to preserve expected behaviour when not using the debugger,
add a more detailed comment explaining why the code is necessary when using the debugger