How to debug custom node type I am following this guide to build a custom node type in Drupal 7:

http://www.sitepoint.com/creating-a-new-drupal-node-type/

Unfortunately, my code is not working and drupal is not outputting any error either. The module is there, is enabled, but the new custom type is not showing up. I have double checked the code several times and I'm sure I wrote it right, the same way of the guide.

How can I debug this kind of issue? I have installed the debug module, I am looking at the documentation here:

http://ratatosk.net/drupal/tutorials/debugging-drupal.html

but I'm a bit lost on where exactly should I up the debugging code to find the issue. I was hoping drupal has some kind of error log (like wordpress does) where I can see anything that goes wrong.

EDIT: I made the custom type work, now I can make a new custom type, but the code about the custom fields is ignored, like it's not there. Here the source of productcustomtype.install:

&lt;?php
/**
 * Implements hook_install().
 */
function productcustomtype_install() {
    node_types_rebuild();
    $types = node_type_get_types();
    node_add_body_field($types['product']);
    productcustomtype_add_custom_fields();
}
/**
 * Implements hook_uninstall().
 */
function productcustomtype_uninstall() {
    $ournewtype = 'product';
    $sql = 'SELECT nid FROM {node} n WHERE n.type = :type';
    $result = db_query($sql, array(':type' =&gt; $ournewtype));
    $nodeids = array();
    foreach ($result as $row) {
        $nodeids[] = $row-&gt;nid;
    }
    node_delete_multiple($nodeids);
    productcustomtype_delete_custom_fields();
    node_type_delete($ournewtype);
    field_purge_batch(500);
}

function productcustomtype_delete_custom_fields() {
    foreach (array_keys(_productcustomtype_installed_fields()) as $field) {
        field_delete_field($field);
    }
    $instances = field_info_instances('node', 'product');
    foreach ($instances as $instance_name =&gt; $fieldinstance) {
        field_delete_instance($fieldinstance);
    }
}

function _productcustomtype_installed_fields() {
    $t = get_t();
    return array(
        'productcustomtype_price' =&gt; array(
            'field_name' =&gt; 'productcustomtype_price',
            'label' =&gt; $t('Price of the product'),
            'type' =&gt; 'text'
        ),
        'productcustomtype_quantity' =&gt; array(
            'field_name' =&gt; 'productcustomtype_quantity',
            'label' =&gt; $t('Quantity of the product'),
            'type' =&gt; 'text'
        )
    );
}

function _productcustomtype_installed_instances() {
    $t = get_t();
    return array(
        'productcustomtype_price' =&gt; array(
            'field_name' =&gt; 'productcustomtype_price',
            'type' =&gt; 'text',
            'label' =&gt; $t('Price of the product'),
            'widget' =&gt; array(
                'type' =&gt; 'text_textfield'
            ),
            'display' =&gt; array(
                'example_node_list' =&gt; array(
                    'label' =&gt; $t('Price of the product'),
                    'type' =&gt; 'text'
                )
            )
        ),
        'productcustomtype_quantity' =&gt; array(
            'field_name' =&gt; 'productcustomtype_quantity',
            'type' =&gt; 'text',
            'label' =&gt; $t('Quantity of the product'),
            'widget' =&gt; array(
                'type' =&gt; 'text_textfield'
            ),
            'display' =&gt; array(
                'example_node_list' =&gt; array(
                    'label' =&gt; $t('Quantity of the product'),
                    'type' =&gt; 'text'
                )
            )
        )
    );
}
function productcustomtype_add_custom_fields() {
    foreach (_productcustomtype_installed_fields() as $field) {
        field_create_field($field);
    }
    foreach (_productcustomtype_installed_instances() as $fieldinstance) {
        $fieldinstance['entity_type'] = 'node';
        $fieldinstance['bundle'] = 'product';
        print_r($fieldinstance);
        field_create_instance($fieldinstance);
    }
}
To make sure the changes apply and work, it is needed to disable the module and unistall it. This important step was missing on the guide.