
The picture above is the correct code, then I modified the code and added a line of code that would produce a compilation error, and then I pressed the run key, but nothing was displayed with any compilation error, and its output was still the output of the previous version (it was supposed to output 7, but it showed 6 from the last time)

But if I use the shortcut of Ctrl+Alt+B, it shows the compilation error correctly.
When I was doing codeforces, I might sometimes accidentally spell the wrong word, and pressing the run key without knowing it could cause trouble. How to fix this?