1

They both dump variables in the same format & style. From some articles or documentation that I'd read, it seems krumo() calls dpm().

The problem is that sometimes I call dpm($var) and nothing happens, but krumo($var) on the same script works fine. I think I'd had the same problem in the reverse circumstance(ie: krumo($var) does not work, dpm($var) works). Why is this so? Is there some structure that needs to be available on the particular page or script that either of these functions uses for it's display? Maybe some region or block?

0

typically inline php code such as a views php field value, or a Display Suite code field for example ... doesn't always run in a page's context.

When you have a field expecting <?php /* some code here */ ?> this is run an Anonymous php function and returns a value.

In my experience dpm() doesnt always work in these cases.

Another example is trying to dpm within a Cron or Queue task. These dont run in a page context either so using something like Devel's dd function can be useful.

| improve this answer | |
0

Another problem with dpm is that if you call if from a theme function a preprocess or a template it will only work after a refresh. That is because the place the date gets printed is already processed when calling the dpm function

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.