So you're having difficulty debugging a .net dll with Sage CRM, you have followed all the instructions in the documentation for setting up debugging but it still doesn't work... Microsoft only knows why sometimes the debugger just will not catch your breakpoints... Well here is a sure-fire way of getting a debugging environment to catch your code:
System.Diagnostics.Debugger.Break();
You can now choose which debug environment you want to use. If you already have the project open you can select it from here also.
Note that once the debugger has been attached any breakpoints you have set should work.
One way to make sure this works for all your pages is to put it in the App Factory constructor like this: