$block->getBlockID()
Permalink
A simple example to show the $bID in edit mode:
$c = Page::getCurrentPage(); if(!$c->isEditMode()){ // Not in edit mode }else{ // In edit mode echo $bID; }
There are other ways to access/display the block ID, but it depends on what specifically you are trying to accomplish.