How to check logs

How do I check error logs. Also, is there a way to test a function without running it? I remember from somewhere that it was possible.

Continue to help post