wp_trash_post not firing

There are two hooks you should be considering– wp_trash_post and trashed_post. Based on your statement that you want this to work “when a post is placed into the trash” I’d suggest the latter is the better hook, since it runs after the post is successfully placed in the trash.

I hate to suggest this as an answer but I do think it explains why your function does not appear to output anything. When WordPress saves a post a request is sent to the server, the request is processed, and then the browser is redirected back to the originating page. That means that you cannot always see dumped/echoed output without killing the script. I believe the following should make your apparently debugging function do what you expect it to, provided that you have “trash” enabled.

function gna_my_function() {
    echo 'trashed '; die;
}
add_action('wp_trash_post', 'gna_my_function');