hi,
Can you help to share what exception is? what code threw the null exception? I wonder if you should try to find the root cause of addin exception firstly.
Regarding remote debug, this should be supported by visual studio for remote debug regardless it's exe application or class library; you may refer to this page(though it's out of date) http://thebuildingcoder.typepad.com/blog/2013/11/debugging-revit-2014-api-with-visual-studio-2013.html