Add #[cfg(debug)] flag to rust suite compilation. Closes #3068