Debugger and Inserts (OpenInsight 32-bit Specific)
At 01 SEP 2002 12:28:35PM Peter Lynch wrote:
I am using the debugger to step through the source code of a running process, as you do.
When the cursor is on a Basic Insert line, the cursor stays there, apparently for each line in the insert.
This is very time consuming for no apparent benefit, unless I want to count the lines in the insert, but there are better ways to do that.
When the insert contains a Gosub to a subroutine in the current source, the cursor does not follow the lines in the subroutine. The cursor stays on the Insert line which contains the Gosub.
This makes it impossible to follow the processing using the debugger.
Is there anything I can do to work around this, other than precompiling and expanding Inserts into the source?
At 01 SEP 2002 07:23PM Paul Rule wrote:
Pete, I've found this quite painful as well. What I do is copy the insert code into the main program for testing then relegate it back to an insert later on. Not very elegant. Maybe someone can suggest a better way.
At 01 SEP 2002 10:51PM Donald Bakke wrote:
Peter,
Yep, this is an old problem. If you want to have some real fun then nest an insert within an insert and the debugger will never trace to the correct line number in your source.
Well, as Paul suggested just move the code, at least temporarily. However, I have always avoided putting gosubs within an insert (or, alternatively, gosubbing to a label within an insert) as they are very difficult to allow someone else to follow my code without very clear documentation.
At 02 SEP 2002 12:03AM Matthew Crozier wrote:
If I end up on a $INSERT line in the debugger, I just put a break point on the first line of code after the $INSERT lines and hit 'Go'. Assuming, of course, a convention of $INSERTs at the top of the source code and containing only EQUates and COMMONs that you don't need to trace.
M@
At 02 SEP 2002 12:17AM Peter Lynch wrote:
Yes - the debugger is a huge improvement over the arev debugger. It allows us to circumnavigate this problem with some manual dexterity.
It is a pity to clog up such a good tool with this idiosyncracy.
At 02 SEP 2002 07:52AM Colin Rule wrote:
Yep, me too. I find it a pain.
What I have done in some cases, where possible, is to make some of the program subroutines in the insert into called subroutines, which you can trace through…. leaving all possible code in the main program.
This is only possible if you use a COMMON or only have a few variables to use.
Colin