2
votes

I am running a local development Drupal site on a Windows machine. I am trying to use the dd($data, $label = NULL) function from the devel module to help debug. Using this function, should write debug info to a drupal_debug.txt file in the /tmp folder on the machine where the Drupal site is hosted.

On my Windows machine, although I am using this function, the drupal_debug.txt file is not getting created anywhere, leading me to believe I am using the function incorrectly.

Here is a snippet of how I am using it,

<?php
$test = "this is my test";
dd($test, $label = NULL);

I am looking for an example of the correct syntax for the dd($data, $label = NULL) function. I have the Devel module enabled.

4

4 Answers

4
votes

Your use of the function should be alright.

One problem could be that Drupal hasn't write access to your temp file dir, which is why you are not getting the file. Do you get an error message when trying to use the function. You can also try see the output of the file_directory_temp() function which will generate the folder that drupal will try to write to.

0
votes

Where are you looking for the file? From a quick read of the code it could be in the following places.

  • C:\winnt\temp
  • C:\windows\temp
  • You php configured upload_tmp_dir
  • Or in one of your sites/files directories under a /tmp folder

You don't say which version of Windows you are on but Vista is very touchy on what goes on in the C:\windows directory. A little hack may be to create your own C:\winnt\temp directory and look in there.

0
votes

Be sure to double check that the call to dd() is in code that's actually being executed. That one got me today.

0
votes

Check admin/settings/file-system where the default upload path is pointing to