Developing and debugging custom modules

Topics: Customizing Orchard, Writing modules
Jul 29, 2011 at 1:09 PM
Edited Jul 29, 2011 at 1:10 PM

We have downloaded the Orchard.Web release and are writing custom modules for our Orchard site. What we have done is set up a Visual Studio solution, to which we add our custom modules, themes, tests etc, but not the pre-existing Orchard modules.

This seemed to be working well and allowed us to write code in the modules easily and debug them, but since adding a reference in a module to Orchard.Widgets.dll (from /App_Data/Dependencies) we cannot debug one of our custom modules. If we remove the reference then we can debug the module. I presume that the change I see happening in dependencies.xml has something to do with this - the file changes from using PrecompiledExtensionLoader with the module dll virtual path to the DynamicExtensionLoader with the csproj path.

As a test I have included the projects for Orchard.Widgets and the modules on which it depends (from Orchard.Web/Modules) into our solution and I can then debug the custom module as Widgets and the custom module become precompiled, but this requires the references in these core modules to be updated to find the Orchard.Framework and Orchard.Core assemblies so is not something we can use as a solution. 

Do you have any ideas on how we can get debugging working with our existing set up?

Coordinator
Jul 29, 2011 at 8:13 PM

You should add the modules to src/orchard.sln, not create your own solution. Debuggin works fine when you do that.