Re: Seeing Source w/ Debugger [message #2392 is a reply to message #2391] |
Thu, 23 June 1994 17:16  |
peter
Messages: 80 Registered: February 1994
|
Member |
|
|
Alan Tai (tai@rockola.larc.nasa.gov) wrote:
: I'm having great difficulty setting breakpoints and figuring out
: EXACTLY what line I'm on while stepping through my IDL 3.5 programs.
: IDL won't let me set breakpoints until after I've run the program.
: Even then, the breakpoint line numbers don't correspond with the
: line numbers I see in vi. This is very frustrating.
: Ideally, I'd like a full-screen debugger, but just displaying
: the source for the current line would be fine for me (like in dbx
: and gdb). I am considering writing a program to preprocess another
: program for debugging. The preprocessed program would load in its
: full source into an array, and at the beginning of every line that
: isn't a continuation, have "print, source(i) & " where i is the line
: number. Has anyone done this? Any suggestions? Thanks.
: Alan
Yes, the debugger has a lot of problems.....
For your particular complaints, however, things are maybe not so bad.
Firstly, the routine needs to be compiled with a .RUN statement before
you can set a breakpoint. You do not need to execute the program.
Secondly, it seems that execution is stopped after the line on which
the breakpoint is set, so you need to set it back one line.
My biggest complaint is that the debugger can only find routines that
are in the directory in which IDL (or PV-WAVE for that matter, they both
have the same problem) is started. Using CD does not help. If the
routine lies in another directory, then the breakpoint routine reports
not being able to find the relevant source statements. Since I like to
keep IDL routines in a different directory than my data (and for large
projects, even split the source across multiple directories), and it is most
convenient to start IDL in the data directory, I have to kill it and
restart it elsewhere when debugging. Similarly, it makes having a
library of routines stored in a different directory somewhat
inconvenient -- you cannot set breakpoints into any routine in the
library.
I have told RSI and PVI of my dissatisfaction with breakpoint, to no
avail so far (they didn't seem to be aware that it was a problem). If
anybody knows of a workaround to the above, please let us all know.
Peter
|
|
|