They weren’t naive enough to believe they wouldn’t slip up, wouldn’t get caught, they knew very well they were no match to Dumbledore. So they talked about how they would do this. They got a journal, disguised as their first years charms book and wrote everything down, and left a note in their drawer and pocket that said "wingardium leviosa’ but when tapped and spoken the code, which was the mispronunciation of the spell it would reveal a note that said to "study first year charms’ to deactivate was the proper pronunciation. They got the idea after studying the Marauders map. Yet that wasn’t enough and they knew it, they needed an ally, someone who could be impassive, someone to trust. It only took them two nights to decide between McGonagall and Snape, and ended on Snape. McGonagall wasn’t only loyal to fault to Dumbledore, but also brash and emotional. Snape could keep quiet. Snape had protected them before.