Copied to clipboard

Flag this post as spam?

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


  • Louis 37 posts 59 karma points
    Jan 05, 2012 @ 14:36
    Louis
    0

    Debugging C# code

    Hi all,

     

    I'm pretty new to Umbraco, but have managed to do alot in a short space of time. One thing I'm having a problem with is Debugging my code. 

     

    Here's my set up,

     

    I have my masterpages with backend code added in my templates, the code works great, but I can't attach to the processes. So for example, if I put a response.redirect to test if the code is being run, it runs! So that's ok on that front.

    However, I can't seem to attach to the process.

    In Visual Studio 2008 I have my project open that contains the code from the master pages and controls. I have put my breakpoint in then in the attach to process window I cannot find the "W3p" process. This just won't show up. Yes, I have selected show all processes. I have also tried attaching to the browser, but that also didn't work. I have also tried attaching to Web matrix and that did not work. The site is running locally using Web Matrix, it has not been published.

     

    Does anyone have any ideas how to get this attaching to the process?

     

    Thanks

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jan 05, 2012 @ 15:00
    Ismail Mayat
    0

    Louis,

    Does webmatrix have its own webserver like visual studio does with cassini? Also what version of windows / iis are you using and have you got debug =true in the web.config?

    Regards

    Ismail

  • Louis 37 posts 59 karma points
    Jan 05, 2012 @ 15:05
    Louis
    0

    Hi,

     

    yes I have debug = true and I'm not sure what you mean by cassini? I am using windows 7 and running locally on my machine

     

    Thanks

  • Louis 37 posts 59 karma points
    Jan 05, 2012 @ 15:08
    Louis
    0

    Hi,

     

    I looked for IIS, and looks like it's not on my machine, it's just using the web matrix

     

    thanks

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jan 05, 2012 @ 15:43
    Ismail Mayat
    0

    so looks like webmatrix is using its own webserver? if so then you need to find that and attach process to that?

    Regards

    Ismail

  • Louis 37 posts 59 karma points
    Jan 06, 2012 @ 14:19
    Louis
    0

    I fixed it! Instead of messing around with Web Matrix, I installed IIS7, then added .net framework 4.0, then added the site in IIS and gave it an app pool etc. I then opened VS 2010, and BAM! The W3WP process was there, attach and there you go! It works.

     

    If anyone would like more in depth details about this please let me know.

  • Barry Fogarty 493 posts 1129 karma points
    Jan 06, 2012 @ 14:22
    Barry Fogarty
    0

    Sorry, too late to help you but maybe the next person on this thread:  For WebMatrix sites, attach to the IISExpress.exe process.

Please Sign in or register to post replies

Write your reply to:

Draft