What are the differences of dpm and dsm for the devel module? I mainly use dsm for the devel module. What are some other common debugging functions that are useful in the devel module?
2 Answers
From the documentation:
Legacy function that was poorly named.
Use dpm() instead, since the 'p' maps to 'print_r'.
Code
function dsm($input, $name = NULL) { return dpm($input, $name); }
So there is no real difference, except the function you are using is left there for developers that failed to switch when it was renamed.
dpm() prints a variable to the ‘message’ area of the page using drupal_set_message(). The output and compact and less likely to break the layout of your page.
From the devel docs:
A note from the devel module: dsm() is a legacy function that was poorly named; use dpm() instead, since the 'p' maps to 'print_r'.
I think we should trust the devel folks on that one.
dpm()
will normally use krumo and notprint_r
.