Newbie needs help debugging

The executable I want to debug is in C:\PSMJ\bin\Release, but the data files the program accesses are in c:\Surveys\Bonus\2011.  When I start debugging it immediately tells me it can't find the files referenced in the program.  How can I tell the debugger where to look for the data files?

  • If you are debugging you should have your build type set to debug and your executable should be in C:\PSMJ\bin\Debug not Release.

    What do your select/assign statements look like for your files?

    You can include the full path to the filename in the ASSIGN clause like:
           select my-file assign to "c:\Surveys\Bonus\2011\myfile.dat"

    If you are only specifying the base filename without a path then you could change your working folder to be:
            c:\Surveys\Bonus\2011 on the properties page-->Debug tab.

    There are many different optons to use including assigning to environment variables or to data items or using MFEXTMAP.

    Please look at the docs under the File Handler section here:


  • One other thing that you can try is to set the environment variable COBDATA to point to the folder where your files are.

    Right click on your project name and choose add->New Item and then select Application Configuration file.

    Then right click on app.config under your project name and select Edit.

    Set variable name to COBDATA and value to c:\Surveys\Bonus\2011

    Now if your program is opening myfile.dat it will search for it in your data folder.