Reputation: 11391
I've inherited a code base that is built on umbraco. It is using razor scripts to render the views.
Whenever there is an error I get something like this in the output:
Error loading Razor Script Product.cshtml
String reference not set to an instance of a String. Parameter name: s
As you can see that is pretty useless in helping identify the error.
I've no idea if this is an umbraco or razor issue (first time I've used either) Is there a way that you can turn on proper stack traces?
Upvotes: 8
Views: 6268
Reputation: 31950
Adding to Sebastiaan's post, you set umbracoDebug
and trace
to true
in the main web.config for the Umbraco installation. This gives fuller info on the error.
Upvotes: 0
Reputation: 5917
Put umbDebugShowTrace=true
in your querystring to see the full stack trace. Make sure umbracoDebugMode
is set to true
in your appSettings and trace is enabled.
Upvotes: 24
Reputation: 430
It's a very good idea to create a website project in Visual Studio and work with your Razor scripts in there. You can Debug > Attach to Process
and then set breakpoints, watches, step through your code etc, just like any other program.
Upvotes: 2