Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. Attach To Web Service Process

Attach To Web Service Process

Scheduled Pinned Locked Moved Visual Studio
asp-netvisual-studiojsonarchitecturehelp
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kevin Marois
    wrote on last edited by
    #1

    I have two copies of VS 2010 open. In one I'm running a MVC 4 Web API on localhost. In the second I'm running some code that calls the WEB API. Is it possible to step into the WebAPI's process so I can run the back end data code? I tried to attach to the first instance of VS, but it doesn't work.

    If it's not broken, fix it until it is

    D 1 Reply Last reply
    0
    • K Kevin Marois

      I have two copies of VS 2010 open. In one I'm running a MVC 4 Web API on localhost. In the second I'm running some code that calls the WEB API. Is it possible to step into the WebAPI's process so I can run the back end data code? I tried to attach to the first instance of VS, but it doesn't work.

      If it's not broken, fix it until it is

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Wait. You're running each app in separate instances of VS? Set breakpoint in your MVC and Web API code wherever you need to poke around and run. So what's the problem? This is exactly how it's done. You run your MVC app in one instance of VS and your Web API in the other.

      A guide to posting questions on CodeProject

      Click this: Asking questions is a skill. Seriously, do it.
      Dave Kreskowiak

      K 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Wait. You're running each app in separate instances of VS? Set breakpoint in your MVC and Web API code wherever you need to poke around and run. So what's the problem? This is exactly how it's done. You run your MVC app in one instance of VS and your Web API in the other.

        A guide to posting questions on CodeProject

        Click this: Asking questions is a skill. Seriously, do it.
        Dave Kreskowiak

        K Offline
        K Offline
        Kevin Marois
        wrote on last edited by
        #3

        Dave Kreskowiak wrote:

        Wait. You're running each app in separate instances of VS?

        This confuses you? They're two different solutions. Lemme explain... The first app contains the WebAPI, as well as the UI, proxy, etc.. Now I'm working on a second app that has to call the same Web API. I will be making changes in the DAL, which is part of the API, for this second app.. So, I open the solution with the API in it, and run the API so now the development server is running. Next I open the second app and want to make calls into the API. But since they're separate apps in separate solutions, how does my second app step into the API so I can debug?

        If it's not broken, fix it until it is

        D 1 Reply Last reply
        0
        • K Kevin Marois

          Dave Kreskowiak wrote:

          Wait. You're running each app in separate instances of VS?

          This confuses you? They're two different solutions. Lemme explain... The first app contains the WebAPI, as well as the UI, proxy, etc.. Now I'm working on a second app that has to call the same Web API. I will be making changes in the DAL, which is part of the API, for this second app.. So, I open the solution with the API in it, and run the API so now the development server is running. Next I open the second app and want to make calls into the API. But since they're separate apps in separate solutions, how does my second app step into the API so I can debug?

          If it's not broken, fix it until it is

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Kevin Marois wrote:

          This confuses you? They're two different solutions.

          No. The point of your question confuses me. You're already doing it!

          Kevin Marois wrote:

          But since they're separate apps in separate solutions, how does my second app step into the API so I can debug?

          It doesn't! You run the API app in it's own copy of VS and it handles all the debugging on that side. VS can only debug one app at a time. If you're already go it in another VS, what's the frickin' problem?!

          A guide to posting questions on CodeProject

          Click this: Asking questions is a skill. Seriously, do it.
          Dave Kreskowiak

          K 1 Reply Last reply
          0
          • D Dave Kreskowiak

            Kevin Marois wrote:

            This confuses you? They're two different solutions.

            No. The point of your question confuses me. You're already doing it!

            Kevin Marois wrote:

            But since they're separate apps in separate solutions, how does my second app step into the API so I can debug?

            It doesn't! You run the API app in it's own copy of VS and it handles all the debugging on that side. VS can only debug one app at a time. If you're already go it in another VS, what's the frickin' problem?!

            A guide to posting questions on CodeProject

            Click this: Asking questions is a skill. Seriously, do it.
            Dave Kreskowiak

            K Offline
            K Offline
            Kevin Marois
            wrote on last edited by
            #5

            Dave Kreskowiak wrote:

            No. The point of your question confuses me. You're already doing it!

            Clearly you don't understand what I'm asking, because if I were already doing it, I wouldn't be asking... So let me break it down some more. Application A's solution contains an MVC 4 Web API. I open the solution and run the API. Server starts, all's OK. Next I open ANOTHER solution with Application B. App B needs to use the same WebAPI being run in solution A. I want to STEP INTO THE CODE in the API from within APP B. I've tried to Attach to both the Web Sever and to APP A's Visual Studio instance, but I when I can't debug the API. Breakpoints don't get hit. I've done this before at a company I once worked for, so I know it can be done. I just can't figure out why it won't work here.

            If it's not broken, fix it until it is

            D M 2 Replies Last reply
            0
            • K Kevin Marois

              Dave Kreskowiak wrote:

              No. The point of your question confuses me. You're already doing it!

              Clearly you don't understand what I'm asking, because if I were already doing it, I wouldn't be asking... So let me break it down some more. Application A's solution contains an MVC 4 Web API. I open the solution and run the API. Server starts, all's OK. Next I open ANOTHER solution with Application B. App B needs to use the same WebAPI being run in solution A. I want to STEP INTO THE CODE in the API from within APP B. I've tried to Attach to both the Web Sever and to APP A's Visual Studio instance, but I when I can't debug the API. Breakpoints don't get hit. I've done this before at a company I once worked for, so I know it can be done. I just can't figure out why it won't work here.

              If it's not broken, fix it until it is

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              Kevin Marois wrote:

              Clearly you don't understand what I'm asking

              I assure you, I do. I've never gotten it to work, so that's why I use two separate instances of VS.

              A guide to posting questions on CodeProject

              Click this: Asking questions is a skill. Seriously, do it.
              Dave Kreskowiak

              K 1 Reply Last reply
              0
              • D Dave Kreskowiak

                Kevin Marois wrote:

                Clearly you don't understand what I'm asking

                I assure you, I do. I've never gotten it to work, so that's why I use two separate instances of VS.

                A guide to posting questions on CodeProject

                Click this: Asking questions is a skill. Seriously, do it.
                Dave Kreskowiak

                K Offline
                K Offline
                Kevin Marois
                wrote on last edited by
                #7

                Dave Kreskowiak wrote:

                I've never gotten it to work

                so what does

                Dave Kreskowiak wrote:

                I use two separate instances of VS

                do for you? how do you debug that API if you can't get it to work. You just contradicted yourself.

                If it's not broken, fix it until it is

                D 1 Reply Last reply
                0
                • K Kevin Marois

                  Dave Kreskowiak wrote:

                  No. The point of your question confuses me. You're already doing it!

                  Clearly you don't understand what I'm asking, because if I were already doing it, I wouldn't be asking... So let me break it down some more. Application A's solution contains an MVC 4 Web API. I open the solution and run the API. Server starts, all's OK. Next I open ANOTHER solution with Application B. App B needs to use the same WebAPI being run in solution A. I want to STEP INTO THE CODE in the API from within APP B. I've tried to Attach to both the Web Sever and to APP A's Visual Studio instance, but I when I can't debug the API. Breakpoints don't get hit. I've done this before at a company I once worked for, so I know it can be done. I just can't figure out why it won't work here.

                  If it's not broken, fix it until it is

                  M Offline
                  M Offline
                  Mycroft Holmes
                  wrote on last edited by
                  #8

                  Kevin Marois wrote:

                  I want to STEP INTO THE CODE in the API from within APP B.

                  I think this is the issue, I set a second break point at the entry point of the call to the web api instance. You can't step from 1 instance to another AFAIK.

                  Never underestimate the power of human stupidity RAH

                  1 Reply Last reply
                  0
                  • K Kevin Marois

                    Dave Kreskowiak wrote:

                    I've never gotten it to work

                    so what does

                    Dave Kreskowiak wrote:

                    I use two separate instances of VS

                    do for you? how do you debug that API if you can't get it to work. You just contradicted yourself.

                    If it's not broken, fix it until it is

                    D Offline
                    D Offline
                    Dave Kreskowiak
                    wrote on last edited by
                    #9

                    No I didn't. Run the Web API project in one instance of VS and I run the client project in another. Each instance is debugging only a single process. No problems at all. All breakpoints set in each respective project gets hit and shows up in the instance of VS that's running that project.

                    A guide to posting questions on CodeProject

                    Click this: Asking questions is a skill. Seriously, do it.
                    Dave Kreskowiak

                    K 1 Reply Last reply
                    0
                    • D Dave Kreskowiak

                      No I didn't. Run the Web API project in one instance of VS and I run the client project in another. Each instance is debugging only a single process. No problems at all. All breakpoints set in each respective project gets hit and shows up in the instance of VS that's running that project.

                      A guide to posting questions on CodeProject

                      Click this: Asking questions is a skill. Seriously, do it.
                      Dave Kreskowiak

                      K Offline
                      K Offline
                      Kevin Marois
                      wrote on last edited by
                      #10

                      OK, this may be the problem. When I set a breakpoint in the API and run the code in the second app, the breakpoint in the first app never gets hit. I was under the assumption that I needed to attached to the API's process to step into it.

                      If it's not broken, fix it until it is

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups