How to debug this search & replace strings snippet?

Notice the if ( is_page() line. It’s to indicate that the snippet only works with pages, not posts. Pull it out of the if condition if you want to apply it site-wide.

function wpdocs_replace_content( $text_content ) {
    $text = array(
        'chamber' => '<strong>chamber</strong>',
    );
    $text_content = str_ireplace( array_keys( $text ), $text, $text_content );
    return $text_content;
}
add_filter( 'the_content', 'wpdocs_replace_content' );