It depends on the bug. If it is a code error, you can see it in the modeler. Most of the bugs are no syntax errors, they are often logic errors.
You need to define tests that need to pass every time you want to do a release. An automated test tool like ATS could help doing such tests.
You could use the debugger function on Mendix. Try to reproduce the bug locally and then try to debug it locally. It is also possible to debug your online apps, but this is only possible with licenced node. In that case, you should make sure to only test and debug on a test or acceptance node.
For more details I would suggest to have a look in the academy. There you can find some interesting learning paths all around Mendix.
You should check out this learning path on logging and error handling
It contains much information you need concerning those subjects.
Thank you for your answer.
you are right, most of the errors are logic errors. But event I did the test, the APP Maybe also exists some problems, can I log anything and analyze the log file when needed. When some problems has happend in the APP which is running, How can I do ?