1
votes

Have an interesting situation. Working with umbraco website and debugging it inside Visual Studio. Just added a .cs file to the app_code folder within the project structure. Wanted to test adding a class to the app_code folder for flexibility, so I wouldn't have to create a class library project and compile the code to a .dll. I'm using webmatrix 2 with IIS express 8 to preview my website (those of you knowing umbraco, you don't run from inside Visual Studio, just use it for coding and debugging).

My issue is I'm unable to debug the app_code .cs file after I attach the debugger from within Visual Studio. All my other files catch the breakpoints (example: macroScript folder). Just wondering if this is possible or not as I know the app_code folder will automatically get compiled at runtime by aspnet so I'm wondering if this is the issue? And would the same go for .cshtml located in the app_code folder?

2
I'm also unable to debug razor helper code from within the same .cshtml, the debug just skips over but the helper code is definitely firing as the intended html is being sent to my web page. Strange.maguy

2 Answers

1
votes

Something else worth trying is running the site in Visual Studio, using your IIS setup as the custom server.

0
votes

It could just be as simple as changing a few web.config settings. Make sure to make a backup of your web.config before attempting this.

Set compilation/debug to "true". Remove "/optimize+" from compilers/compiler/compilerOptions.

Reference: http://forums.asp.net/t/958358.aspx/1