Add the detection of `debugger` when crystal build --release

Of course, I think this should be the responsibility of the programmers themselves, as I also used to write binding.pry and then submit the code.

However, as Crystal does now,, add a little overload when do build --release, we can always avoid submit debugger directly into repo.

In fact, i try add a debugger and built in, no any error, but when run it, get error like Trace/breakpoint trap (core dumped), if we can improve this to give error message when build instead?

It is a perfectly valid use case to debug a program built in release mode with debugger. So I don’t think that can serve as a detection mechanism.

If you don’t want to commit code with debugger, maybe you could add pre-commit hook to validate that? There might be false positives though. And at least I tend to regularly commit some work-in-progress code which may contain debugging instructions. So I wouldn’t want to use that.
Next option might be a check that happens before merging a change or before pushing it to the main branch.