1. Go to Domains.
2. Select the URL of Community
3. Select the Community.
4. Click Public Access Settings button.
5. Click Assigned Users. Get the username.
6. Go to Debug Logs.
7. Click New and select the user.
8. If you are in chrome execute the below command in the console.
document.cookie="debug_logs=debug_logs;domain=.force.com";
9. You will start seeing debug logs for the community guest user.