Set debug flags correctly.