locked
Dubug plugins merged with ILMerge RRS feed

  • Question

  • Hi,

    I'm trying to debug a plugin that is in a dll which is several assemblies merged with ILMerge. I'm having problems getting the breakpoints to be caught. Is this possible at all or should I try to arrange this in another way? 

    The reason the assemblies are merged is to deploy them to the database and there are referenced libraries with general functions that need to be available.

    Thanks


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Monday, July 8, 2013 6:28 AM

All replies

  • To debug you need the correct debug symbols (.pdb file) in the server\bin\assembly folder. The 'correct' file will correspond to the merged assembly; ILMerge can generate this pdb file, and I think it does it by default


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, July 8, 2013 7:46 AM
    Moderator
  • Thanks for helping me on this David.

    I have moved the pdb to the assembly folder, I have the dll in the database but the debugger in VS 2012 doesn't catch the breakpoints. I have attached the VS to the w3wp process(es) and made sure that the merged name matches that of the plugin assembly that is "master" for the merged file. Do you have any ideas where I can try to start poking into this since it's sort of difficult to see why the dubegger doesn't catch the breakpoint.

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Monday, July 8, 2013 7:59 AM
  • In VS, once you've started debugging, go to the Debug, Modules window (this was for VS 2010 - it may have changed in VS 2012). This will show all the assemblies, where they've been loaded from, and whether the symbol file has been loaded. You can also load the symbol files from this window.

    Are you running VS on the CRM Server, or using Remote Debugging ? If you're using Remote Debugging then the symbol path gets interesting


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, July 8, 2013 10:27 AM
    Moderator
  • I'm trying to do this on the server... Haven't had much luck with remote debugging in the past. 

    When I open the modules I don't see any of the modules that I'm interested in, is this due to them being loaded from the database on runtime? This is a bit frustrating, but if it's not possible to get this right I suppose I'd have to do with logging.

    Thanks for all help.


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Wednesday, July 10, 2013 11:40 AM