dump $variables in theme_preprocess functions In theme_preprocess functions (e.g. theme_preprocess_block, theme_preprocess_menu, etc) there is the $variables argument.

In Drupal 7 I could look at this variable using devel module and typing dpm($variables).

How I can do that in Drupal 8?

I tried kint, dump and var_dump, but for all of them I get a fatal error memory exhausted.
The best way would probably be a breakpoint with xdebug turned on. Which requires configuration efforts though.

What I was normally doing in similar cases was a step-by-step approach. I was printing out $variables keys first and then narrowing my var_dump with a specific key. E.g. var_dump($variables['key']). Slowly but surely.

In the end I think that in terms of efforts it is way better to set up debugger and use breakpoints to inspect variables.