RE: There is no source code available for the current location.

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Eric Scouten (anonymous_at_discussions.microsoft.com)
Date: 05/26/04


Date: Wed, 26 May 2004 13:16:03 -0700

I'm having a similar problem. I've verified all of the items that Robert wrote about and found them to be correct. Some specifics about my situation:

1. This is a C# application, using a Managed C++ DLL, which sometimes calls a C# DLL.
2. The problem occurs when the Managed C++ calls a function pointer. (Yes, not a delegate -- function pointers are required because we are also compiling for MacOS in this DLL.)

I am unable to step into or hit any breakpoint in the function pointed to by the function pointer -- or ANY function that it calls. Instead of stopping where I would expect, I get stopped in mscorwks.dll with the "There is no source code available for the current location" message. One level *up* on the stack trace is the function where I would have expected to stop, with the green arrow pointing to the correct line and all local variables displaying as corrected.

What's going on? Is there any workaround?

-Eric

     
     ----- Robert Gruen [MSFT] wrote: -----
     
     It sounds like the symbols you have are not lining up with the binaries
     you're generating. Do the following:
     
     1. Verify that you are in debug mode and not release mode.
     2. Verify that the timestamp of the .pdb file is the same as the .dll or
     .exe that you're generating. If they are not, remove all of the binaries
     and recompile your entire solution.
     3. If the additional assemblies you are trying to debug are not part of
     your solution (i.e. other projects), go under the properties for the
     solution and be sure to include the "Debug Source Files" and "Debug
     Symbol Files" locations of the additional assemblies you're trying to debug.
     
     Thanks! Robert Gruen
     Microsoft, VB.NET
     
     This posting is provided "AS IS", with no warranties, and confers no rights.
     
     --------------------
     #From: "Peter Afonin" <pafo@specialtypulltabs.com>
     #Subject: There is no source code available for the current location.
     #Date: Wed, 19 May 2004 16:44:28 -0700
     #Lines: 15
     #X-Priority: 3
     #X-MSMail-Priority: Normal
     #X-Newsreader: Microsoft Outlook Express 6.00.3790.0
     #X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.132
     #Message-ID: <e2BrDufPEHA.2924@TK2MSFTNGP10.phx.gbl>
     #Newsgroups: microsoft.public.vsnet.debugging
     #NNTP-Posting-Host: 206-124-146-196.blarg.net 206.124.146.196
     #Path:
     cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
     8.phx.gbl!TK2MSFTNGP10.phx.gbl
     #Xref: cpmsftngxa10.phx.gbl microsoft.public.vsnet.debugging:5696
     #X-Tomcat-NG: microsoft.public.vsnet.debugging
     #
     #Hello:
     #
     #I was always getting sometimes this error while debugging ASP.Net project
     in
     #VS.Net 2003: "There is no source code available for the current location.",
     #but recently I started getting it so often that I almost cannot debug at
     #all. What could cause this? Is there a way to fix the situation?
     #
     #I would appreciate your help.
     #
     #Thank you,
     #
     #--
     #Peter Afonin
     #
     #
     #
     
     



Relevant Pages

  • Re: Debug a C DLL
    ... The dll is dynamically loaded and I ... and in debug mode you get away with it because ... Mark McIntyre ...
    (comp.lang.c)
  • Re: [VS2008 SP1][std::vector] _CRT_DEBUGGER_HOOK crash in Release mode only
    ... _SECURE_SCL and _HAS_ITERATOR_DEBUGGING are both enabled by default in debug mode. ... Note that if you enable _HAS_ITERATOR_DEBUGGING, make sure to enable it for *every* projects in your solution (in fact, H.I.D. changes the structure and logic of STL classes, so it is not correct to mix STL classes that have H.I.D. enabled with STL classes with the same name but with H.I.D. disabled.) ... For Release mode, you might want to check that all of your projects use Multi-threaded DLL, in case you are going to pass C++ classes through DLL boundaries. ...
    (microsoft.public.vc.language)
  • RE: 800a01ad error while debugging VB6 DLL under IIS6.0 on Win2003SP1
    ... I am looking for possible solutions to debug it using terminal server. ... A VB6.0 DLL works fine when called from ASP page without debug mode. ...
    (microsoft.public.win32.programmer.ole)
  • RE: 800a01ad error while debugging VB6 DLL under IIS6.0 on Win2003SP1
    ... I am looking for possible solutions to debug it using terminal server. ... A VB6.0 DLL works fine when called from ASP page without debug mode. ...
    (microsoft.public.vb.com)
  • Re: How to connect to children process
    ... Main problem is amount of manual operations required per debug cycle. ... connection to DLL with debugger takes sensible amount of time and manual ... Is the main problem that the debugger keeps symbols file loaded ... AFAIK that's how VS2003 debugger works, but WinDbg should usually ...
    (microsoft.public.vsnet.debugging)