Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to step into my local service that is in my solution

I know this has been asked before but I just cannot figure this out. I believe I have covered everything that has been brought up already but I'll cover those.

I am getting this message when I try to step into a service that is a project that is currently in my solution:

enter image description here

I have 3 projects in my solution:

SuburbanCustPortal <-- my website SuburbanHub <-- my serice WebsiteLogging <-- my logging project (no significance here)

I read that I should check the following items:

  1. Make sure that debug is on. I have this in both of my project's web.config:

  2. Make sure they are both using the same .net version. They are both on the .net framework 4.0.

  3. Make sure Enable Just Your Code is unchecked:

enter image description here

The service is pointed to a local url:

enter image description here

I can pull up the service in my browser without error:

enter image description here

This is my settings for iis:

enter image description here

I have restarted visual studio, the computer and removed the service and added it back.

I cannot, for the life of me, figure this out. If I have missed anything I am willing to give it a shot.

It is very important that I get this resolved so I can get this project out this weekend so any help would be greatly appreciated.

IN RESPONSE TO Sanket Shah

I do not have the option w3wp.exe:

enter image description here

SOMETHING I FORGOT TO MENTION

I have set debug=true in both of my projects:

<compilation targetFramework="4.0" debug="true">
  <assemblies>
    <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  </assemblies>
</compilation>

Also, I wanted to add that I have been able to step into my service before but since coming back to the project recently, I am not able too. I have a break point on the line that calls the service and when I try to F11 in to it, I get the above message.

IN RESPONSE TO Pawel

I have tried setting symbols the follow ways and neither allowed me to step in:

enter image description hereenter image description here

I have even tried to use the Microsoft symbols:

enter image description here

IN RESPONSE TO Pawel #2

enter image description here

ADDITION INFO

I just noticed this, I'm not sure if it is related:

enter image description here

ADDITIONAL INFO ABOUT DEBUG MODE

I have all projects set in debug mode:

enter image description here

like image 812
ErocM Avatar asked Sep 13 '14 13:09

ErocM


People also ask

How do I fix unable to start debugging on web server?

Open your project properties and make sure that the project is configured to connect to the correct Web server and launch URL. (Open Properties > Web > Servers or Properties > Debug depending on your project type.) If that does not work or you are debugging remotely, follow steps in Check your IIS Configuration.

How do I debug a NuGet package locally?

In order to debug into NuGet package libraries, Visual Studio must be configured to use ProGet as a symbol server. To do this select Debug > Options, from the menu bar, then browse to Debugging > Symbols in the tree menu.

How do I enable debugging in Visual Studio?

In the Visual Studio toolbar, make sure the configuration is set to Debug. To start debugging, select the profile name in the toolbar, such as <project profile name>, IIS Express, or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5.


2 Answers

Your solution/project/settings file(s) might be / seems like it is corrupted. If you create a new solution from scratch, adding new projects which mimic your current structure, you can try and see if debugging works properly.

If that works, gradually move the code over while keeping checking that debug keeps working.

like image 120
Alex Avatar answered Nov 03 '22 01:11

Alex


I don't know why this doesn't work.

I have a work-around for you, which you verified in the comments: add System.Diagnostics.Debugger.Break() somewhere in your service after it starts. This should pop up some sort of exception window, with a list of Visual Studio instances open. Pick the one with your solution and click OK, and it should attach correctly to that location.

Annoying? Yes. In my experience with Visual Studio, it can be very finicky sometimes about debugging into Windows services. This is the only reliable way to do it that I know about.

like image 30
ashes999 Avatar answered Nov 02 '22 23:11

ashes999