Question for the VFP team: Why can’t the debugger get the code?

There are many reasons why the debugger can’t always get the code but as a developer, one always wants to ask.
I have several apps. I turn on “Include Debugger code” in the project manager. When an error occurs, why can’t the debugger find the information?
Yes. The debugger can read the Class code and shows it. but PRG files (where many developers keep their code) are kept hidden from this area.
There may be ways around it but WHY can’t VFP read the “include debugging” code from program files?

3 thoughts on “Question for the VFP team: Why can’t the debugger get the code?”

  1. Do you have sample code to reproduce your scenario?
    Are you running an EXE? Are you DOing an APP or EXE from the command window?
    Repro code shows unambiguously what you mean.

  2. Typically this happens when you have your source in one directory where you build your project and then you are running it in another directory and then trying to debug it.

    Simplest steps to reproduce:

    Build a project:

    Function WhatsmyName
    IF SYS(0)=”andrew”
    RETURN “Good”

    RETURN “Bad”

    The form has a button on it that does

    Now build this as an EXE or an APP.

    If you run it in your Dev environment and use the debugger, you can see all of the code.

    Copy the app to another folder, restart VFP and then try again using the debugger with a Breakpoint on PROGRAM(). The code in the BUTTON click will show but the code in MAIN.PRG will be “Source Not Available”

    Make sense?

Comments are closed.