Console stopped working after crash


I have a basic script which just prints out some text. First few times when I ran my script everything was okay, but once I tried to run it, Unity froze. After force closing and reopening and trying to rerun my script, no log appears in the console. I checked my 3 console filter buttons are toggled, so it should print my message. How can I fix this issue?

My code is:
void Start(){
print(“Print this”);

Thank you in advance.

Okay. I figured it out. When it crashed I lost everything unsaved in my Unity Editor. So my script was not attached to the GameObject. Duh.