hook_form_FORMID_alter not working function send_xml_form_user_profile_form_alter(&amp;$form, &amp;$form_state){
    $form["#submit"][] = 'send_xml_edit_account_submit_function';
    drupal_set_message('&lt;pre&gt;' . print_r($form['#submit'], TRUE) . '&lt;/pre&gt;');
}

function send_xml_edit_account_submit_function($form, &amp;$form_state) {
    drupal_set_message(t("ahoy"));
}


the modules name is send_xml.module.

this code drupal_set_message('&lt;pre&gt;' . print_r($form['#submit'], TRUE) . '&lt;/pre&gt;'); displays

Array
(
     [0] =&gt; user_profile_form_submit
     [1] =&gt; send_xml_edit_account_submit_function
)


but this code drupal_set_message(t("ahoy")); isnt displaying...

anyone ring a bell?

it's quite annoying to have problems which you cant find the reason why... does anyone experience this before? if yes, would please so kind to share your solutions to me. thank you very much! :)
Can you try 

function send_xml_form_user_profile_form_alter(&amp;$form, &amp;$form_state, $form_id){
    $form['actions']['submit']['#submit'][] = 'send_xml_edit_account_submit_function';
    drupal_set_message('&lt;pre&gt;' . print_r($form['#submit'], TRUE) . '&lt;/pre&gt;');
}


Try clearing Drupal cache before you see the changes..