In WordPress, how can I get the error log to see a postID of a page on the load of post.php?

I have tried using get_the_ID(), global $post; error_log(print_r($post->ID,true)), the_ID() and I cannot the post_ID of a page on load in WP. I have added:

How can I do this?