Troubleshooting a custom MA for FIM2010 starts usually with looking into the eventlog
So in this case there was not much to see, so I added my .NET Trace statments to the code. Easy, but where to configure the switches?
Finally i found that the MA is loaded by the FIM server itself so theres the config file too.
The server is still called MIISSERVER.EXE and located in
C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Bin
So just edit C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Bin\miiserver.exe.config and add you listener and switches:
<trace autoflush="true" indentsize="4">
<add name="MySwitch" value="4"/>