Here is how to debug native messageing: enable logging.
By adding a flag, it can open Chrome logging window when starting Chrome.
For Windows, you just need to right click on the Chrome icon in your installation folder / shortcut / taskbar —— Properties —— add this line behind the target string:
A logging window will start with the Chrome. There the native messaging stuff will be print out.