Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • yogesh 7 posts 67 karma points
    May 08, 2013 @ 12:58
    yogesh
    0

    Debugging razor code in umbraco

    Hi All,

     

    I want to know how to debug razor files present under scripting files folder in umbraco. When the scripting file contains any errors and when i click on the preview button on the page which is associated with the scripting file, i get an error as error loading razor script....., can any one please help me on how to debug razor files directly in umbraco.

     

    Thanks

    yogesh

  • Charles Afford 1163 posts 1709 karma points
    May 09, 2013 @ 21:17
    Charles Afford
    0

    There is not really any way you can debug in Umbraco so to speak.  If you have Visual Studio you can attached to the W3 process.  One way may be to add some

    <h1> TEST </h1>

    Then see what result you get back in the cshtml file :).  Charlie

  • yogesh 7 posts 67 karma points
    May 10, 2013 @ 11:28
    yogesh
    100

    Thanks for the reply charles and at times i get an error like,"error loading razor script xyz.cshtml", so even if i use h1 or any other elements , i am not able to find where the error is located . And can u brief about attaching to W3 process as i am new to it.

     

    Thanks

    yogesh

  • Charles Afford 1163 posts 1709 karma points
    May 10, 2013 @ 11:35
    Charles Afford
    0

    Have a look at: ttp://charlesafford.com/post/2013/04/16/Setting-Up-Umbraco-with-IIS

    Not sure what to say about w3wp service, maybe have a look for something about it. My post above will tell you how to create a Umbraco instance with IIS and then you can attach to that and debug using w3wP :). What does your code look like? Maybe i can help with that :). Charlie

  • yogesh 7 posts 67 karma points
    May 10, 2013 @ 11:44
    yogesh
    0

    Actually i am new to umbraco and working on with razor snippets. I created a simple razor snippet and at intial stages i was getting errors as mentioned above and luckily i was able to solve it. I thought it would be better if there is any specific way or tool to debug razor snippets so that in future it will not be a problem for me.

    I will have a look at the link mentioned by you.

    Thanks yogesh

     

     

Please Sign in or register to post replies

Write your reply to:

Draft