Are you trying to recompile while 3dsmax is running? You may need to reset your scene to make sure that any instances of your plugin are cleared before it can be reloaded in a running instance.
Typically to debug you'd first launch 3dsmax normally, then inside your c# project go to Debug->Attach to process... and pick running 3dsmax process. Then you can set breakpoints, catch exceptions, etc.
Marsel Khadiyev (Software Developer, EPHERE Inc.)