views:

8614

answers:

4

Ok, this is my own fault, but I can't seem to rescue myself.

Whenever I try to step into a class that has fields with assignments calling into .NET code, I get a dialog box that contains this text:

---------------------------
Microsoft Visual Studio
---------------------------
There is no source code available for the current location.
---------------------------
OK   
---------------------------

For instance, stepping into the constructor of the following class would give me the above message:

public class Test
{
    private Stack<String> _Dummy = new Stack<String>();
    public Test() { }
}

I assume this is because at some point I fiddled with the settings for the symbol server, but no matter what I fiddle with now, I can't seem to get rid of that message.

Can anyone point out where my stupidity has forgotten what it did?


Summary of my current options:

  • [ ] Enable address-level debugging
  • [x] Enable Just My Code (Managed Only)
  • [ ] Enable .NET framework source stepping
  • [ ] Enable source server support
  • Symbol file .pdb locations - empty
  • Cache symbols from symbol servers to this directory: C:\temp (empty)
+1  A: 

Are the PDB files for your own code up to date?

Will Dean
Yes, cleaned and rebuilt everything.
Lasse V. Karlsen
+1  A: 

Check if your projects have a project reference not dll reference! If there exists a dll reference, your changes will not be recognized by your referenced project and you will get an error message like yours.

yapiskan
Hmm, good point, I'll check that.
Lasse V. Karlsen
+3  A: 

See if some source files are accidentally excluded. Do properties of the solution and look at the Debug Source Files section under Common Properties.

JGurtz
A: 

Hi

I was also facing this issue and luckily find out following solution.

If you do not want to debug .NET assembly, a quick fix to avoid "No source available to current location" problem is to uncheck "Require source files to exactly match the original version" check-box under Tool -> Options -> Debugging -> General

Please let me know, if it solves your problem.

Thanks Shilpa

Shilpa Silk
I tried it, didn't work for me ..!!
msbyuva
Hi msbyuvaAfter unchecking the above check box option. Close the Visual Studio and restart it. Don't forget to re-build all source code. I hope it solves your problem. It worked for me.
Shilpa Silk