Debugging multiple projects in same solution

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    Debugging multiple projects in same solution

    Hi!

    I have 2 projects in my solution and I have figured out how to get both to run in debug mode however the breakpoints are never actually being stopped at.

    Right now, in the solution explorer, I am right clicking on each project and selecting Debug->Start new instance. The projects run, and I see output...but the debugger is not stopping at the break points.

    Has anyone else experienced this?
    I'm using Visual Studio 2008...

    -Frinny
  • balabaster
    Recognized Expert Contributor
    • Mar 2007
    • 798

    #2
    Originally posted by Frinavale
    Hi!

    I have 2 projects in my solution and I have figured out how to get both to run in debug mode however the breakpoints are never actually being stopped at.

    Right now, in the solution explorer, I am right clicking on each project and selecting Debug->Start new instance. The projects run, and I see output...but the debugger is not stopping at the break points.

    Has anyone else experienced this?
    I'm using Visual Studio 2008...

    -Frinny
    One of a few things spring to mind:

    1). You're hitting CTRL+F5 to build/run your application instead of just F5 - in which case it's not being run in the debugger but is spawning an outside process.
    2). The browser you're looking at (if an ASP.NET application) isn't the debug instance but instead another instance. Right click your ASP.NET development server in the taskbar and close it. Close all your browser instances, run again.
    3). Debugging is disabled - when you first run a web application it comes up with a dialog that suggests that debugging is disabled and asks you to enable it by pressing OK. You may have inadvertently clicked the wrong button. Check your web.config and that <compilation debug="true"> - by default this is false.
    4). Your code isn't passing through the codeblock where your breakpoint is set. Since I know you're a decent programmer, I'm going to assume that this isn't the case ;)
    5). I had a play with VS2008 to see if I could replicate the issue and couldn't...

    I did find this though that may be of assistance: http://stackoverflow.com/questions/6...8-stop-working
    Hope that helps...

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Maybe I should have given more details about the application I'm working on right now. My solution has 2 projects in it: a console application that is a socket-server, and a win-forms application that is a client. (I'm playing with regular sockets right now before I start testing a VB6-sockets thing).

      1) I am not hitting Ctrl+F5 (I'm right clicking on the projects and select "Debug->start new instance" or "Debug->step into instance")

      2&3) I'm not working with ASP.NET right now

      4) See that's the weird part....the code is being executed. I have some console.writeli ne statements and have set a breakpoint right on that code...the text is being written into the console but Visual Studio is not stopping at the break point.

      I've gone through a whole bunch of articles online and nothing's explaining why this might be the case.

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Well I don't know what was wrong....but it suddenly started working???
        Weird!!

        Thanks for your help though!

        -Frinny

        Comment

        • balabaster
          Recognized Expert Contributor
          • Mar 2007
          • 798

          #5
          Originally posted by Frinavale
          Well I don't know what was wrong....but it suddenly started working???
          Weird!!

          Thanks for your help though!

          -Frinny
          Eek, the worst kind of bug, one that just goes away without explanation. Glad it works again, have my fingers crossed that it doesn't resurface :D

          Comment

          Working...