This project is read-only.

Debugging Orchard Module

Topics: General
May 17, 2013 at 7:42 AM

I notice when you add a module in Orchard, this one is compiled on the runtime.
My question is I try to change the code after to launch Orchard by pressing F5 in Visual Studio.
And Visual Studio refuses when I try to change the code from my module. I disabled it before.
I uncheck in the option Brek all processes when one process breaks.
Is it possible to debug in real time?

Best regards,
May 17, 2013 at 1:42 PM
I don't really understand your issue.
Orchard can dynamically compile modules, i.e. if you change a module it will get recompiled without compiling from VS. After a module is compiled, added to your solution and the build target is Debug you can debug it freely.
May 17, 2013 at 2:11 PM
I mean I need to stop debug process to modify the source code in a module.
Press F5 one more time, wait the website is launching.
I try one more time to modify the code, it's not possible, I need to stop the process.

Because my assumption was, "super" the code is dynamic, so I can change the code without to relaunch the website, but it's not possible.
So my question is finally is-it possible to debug and modify code without to stop and start the launching of the website.
Is it clear?
May 17, 2013 at 2:22 PM
Yes, it's possible. Being able to modify the code while the debugger is attached is a VS issue, there's some config for that in VS.
May 21, 2013 at 7:02 AM
I find this topic explained it's not supported.
May 21, 2013 at 11:41 AM
Well, I use it on a daily basis on 64b so I'm pretty sure it is :-). Probably we don't mean the same thing, but long story short: I can edit module .cs files while the debugger is attached and the changes are correctly picked up by dynamic compilation.
May 21, 2013 at 1:54 PM
"while the debugger is attached and the changes are correctly picked up by dynamic compilation."
Do you know which special options used in the configuration, because if I try to modify a windows appear

Step1 I try to modify
"changes are not allowed while code is running or if the option ' break all processes when one process breaks' is disabled.
The option can be enabled in Tools->Options->Debugging

So I modify by check the option because this option is uncheck in my env.
Press F5.
Same message.

Finally I try to follow the
Not work too.
Edit and continu is enabled.

I use Visual Studio 2008. :(
May 21, 2013 at 3:34 PM
Sorry I can't remember what I configured for this to work a long ago but it seems what you've done should be enough. This used to work with VS 2010, not sure about 2008.
May 21, 2013 at 3:41 PM
Agree with you, but not. So I dont continu to investigate.
Hum maybe it's link to the fact my project is under source control.