i took example from cloudera website to write a custom SerDe for parsing a file
http://blog.cloudera.com/blog/2012/12/how-to-use-a-serde-in-apache-hive/
it seems
Hive code can be debugged.This link may help you : https://cwiki.apache.org/confluence/display/Hive/DeveloperGuide#DeveloperGuide-DebuggingHiveCode