This project is read-only.

How do I debug my site?

Topics: General
May 28, 2014 at 9:00 AM
I started to look into Orchard sources.
Dounloaded the sources, opened it in Visual Studio 2013 Express for Web.
Made "Orchard.Web" start project, press F5 - the orchard installation launches and everything is cool.
Now I want to debug something inside my orchard site.
How do I set a breakpoint, for example, to ~/Themes/TheThemeMachine/Views/Layout.cshtml?

P.S. I also tried to open the compiled (ready) orchard website (the first item Orchard's website proposes to download) as a website in visual studio - it ends up with error. but is launched ok from WebMatrix.
May 28, 2014 at 10:07 AM
For debugging use the full source, not the web version.
May 30, 2014 at 9:26 AM
As I wrote before, I tried both full sources and the web version.
How do I set a breakpoint, for example, to ~/Themes/TheThemeMachine/Views/Layout.cshtml?
May 30, 2014 at 10:47 AM
Tried setting a breakpoint like you normally would?
Jun 7, 2014 at 7:05 AM
I can't! 'cause ~/Themes/TheThemeMachine/Views/Layout.cshtml is not part of the solution. It's somehow installed dynamically
Jun 8, 2014 at 12:16 AM
Edited Jun 8, 2014 at 12:20 AM
Dear Aliq,

First an idea on how to do it and then a request for help...

Try System.Diagnostic.Debugger.Break() where you want a breakpoint to execute. Then Windows should ask you to attach the debugger when it gets loaded.

I am trying to do something similar with the source code of Orchard 1.8 I downloaded yesterday. I am using VS 2013, Windows 7, an I also have installed Webmatrix.
I already fixed an issue with VS 2013 and Webmatrix where IIS Express got confused on website's config (Documents\IISExpress\config\aplicationhost.conf).

If I try to debug anything, adding a breakpoint, I never go ahead of the blank browser screen (IE & Chrome). I even tried to set up breakpoints using System.Diagnostic.Debugger.Break() in global.asax.cs but it didn't work for me.

Had you run into issues like this too?

Regarsd :)