http://nikspatel.wordpress.com/2011/07/20/debug-browser-enabled-infopath-2010-forms-deployed-on-sharepoint-2010-using-visual-studio-2010/