How Can I display values of variables in a "PHP contextual filter code" to debug my code?
Install the Devel module with the Search Krumo module and you will be able to use the dpm() function.


  Devel
  
  
  Helper functions for Drupal developers and inquisitive admins.
  Enable the included Kint submodule as for pretty print of variables. kint($array) function is provided, which pretty prints arrays. Useful
  during development. Similarly, a ddebug_backtrace() is offerred.
  


You can read how to use the Devel module at: Debugging Drupal (a page which gives a brief overview of some of the tools you can use to make Drupal development and debugging easier).