alterations in tpl file work, but not dpm();, dsm(); or drupal_set_message(); This question here at DA has a popular suggestion to check page.tpl.php to see if it says print $messages;. I verified this and this is the case. 

I cleared caches many times, btw after which there actually is a drupal message saying the caches are cleared. 

I made sure the dpm(), dsm() or drupal_set_message() functions are nicely outside any conditional statement or php logic whatsoever. I also put all these functions on different places in the tpl file. Still no result.

The same theme also has another tpl file that I used before and had some commented dpm(); functions that I uncommented but these didn't work anymore either.

Devel module is enabled and I am logged in as admin the whole time.
You have access to the entire Drupal bootstrap within template files. Template files are loading at the very end of a page request post bootstrap. If dpm() or dpr() is not working it is most likely because you are viewing the site as an anonymous user. The devel module by default does not allow access to it's functionality for anonymous users. Try logging in as admin and you should see the output of your devel module function calls.

As an F.Y.I. template files are not the typical place for a dpm() as you either need to know the variable you are after or put a get_defined_vars() calls inside it which can be quite heavy depending on where you are in stack. It is more common to use dpm()'s in template hooks such as:


template_preprocess_page()
template_preprocess_node()

function template_preprocess_page(&amp;$vars) {
  dpm($vars);
}


Then you can see all the variables that are available to your template files.