Re: No source code available for current location

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Please clarify what the "Modules window" is. I can't find "Symbol Status" or
the other items you mentioned.

Since the first post, I tried the following. I create a new VB project
named "Test" with the following code:
Module Module1
Sub Main()
Stop
End Sub
End Module
I confirm that the Configuration Manager has the Configuration for this
project set to Debug. I compile it and save it to my VS Projects directory.
While this VS project is still open, I then go into the folder "...Visual
Studio 2005\Projects\Test\Test\bin\Debug" and double-click on Test.exe. A
window pops up saying that "Test has encountered a user-defined breakpoint.",
and I click on Debug. I then select to use "Output: Visual Studio 2005" for
my debugger, and then the window pops up with the message "There is no source
code available for the current location." What I've discovered is that if I
click OK (in response to the "...no source code..." message), and then click
on the "Step Into" icon for debugging, then it goes to the Stop statement as
it should and appears to debug OK. So I'm getting this "There is no source
code available..." message for no apparent reason--it looks like a bug in VS.
The curious thing is that I recall doing this (i.e. debugging from a .exe) a
few months ago without having this problem. Is there some setting that might
affect this?

--
Ed


"Oleg Starodumov" wrote:


I'm debugging/stepping through a Visual Basic program which uses the Shell
command to call a .exe program which I also wrote in VB. The .exe program
was written and compiled on the same PC with the same Visual Studio 2005
(release version), and with the Configuration Manager settings set to Debug
(as is the program I'm calling it from). It used to be that when the .exe
hits an exception (or even a Stop statement), that VS would call up the
source code for the .exe program and show me where the exception occurred,
but now for some reason it is calling up VS and then saying "There is no
source code available for the current location." The source code IS there.
Why is this doing this all of the sudden? (It used to show me the source
code). This is happening not just with this one .exe, but several different
ones.


In Modules window, what messages do the following columns contain
(for the given executable)?

Symbol Status
User Code
Optimized

Also, is the executable started from the correct location?
(Check the path in Modules window, to ensure that an outdated
version of the .exe is not loaded by some reason)

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]




.



Relevant Pages

  • Re: msdos exe file loading related questions, answer as much as u can ;)
    ... # of bytes of last 512-byte block of the exe file ... interpreted by the exe program loader to mean the whole last 512-byte ... program memory image's memory address and some say it is a 32-bit ...
    (comp.lang.asm.x86)
  • Re: Hex Editor & VB6
    ... recent that the EXE is built from. ... every single instance of this string needs to be changed in the EXE. ... Are you absolutely sure that the string "@foober.com" is contained in the source code you compiled from in exactly that fashion (as a specific "whole string" within a Case statement or something similar? ... If you cannot find the string in your own compiled exe then are you sure that the above lines of code were actually contained within the source code when you compiled it, and that you performed a standard native code or pcode compile and have not used anything and the source code does not contain anything that might deliberately make the string difficult to find? ...
    (microsoft.public.vb.general.discussion)
  • Re: C# Exceptions
    ... I did a runtime analysis of the exe and some important DLLs as ... > signature is valid then the app can decrypt the response and process it. ... > the source code of a managed app. ... NOT FOR THE MAIN PROGRAM EXE FILE. ...
    (Pen-Test)
  • msdos exe file loading related questions, answer as much as u can ;)
    ... # of bytes of last 512-byte block of the exe file ... interpreted by the exe program loader to mean the whole last 512-byte ... program memory image's memory address and some say it is a 32-bit ...
    (comp.lang.asm.x86)
  • Re: Dangerous Dede -- Generate Form .pas from Exe
    ... The .exe wouldn't even be able to run without that. ... Only by analyzing the raw opcodes again. ... I know - I once generated viable C++ source code from a DLL. ...
    (borland.public.delphi.non-technical)