Solved

Debugger limitations

Posted on 1997-04-21
9
164 Views
Last Modified: 2010-04-04

Is there some limit to the amount of symbol information that Delphi 1 can cope with? I've a large project ( 100+ units ) which has started to show debugging problems. The browser doesn't always know about a symbol when asked, and setting breakpoints doesn't always work on lines that are definitely being called. Yes, I've got all the debug flags ( except TDW ) on, yes, I'm building everything in sight, and no, I'm not optimising for load time.
Is this a known problem? Any way to fix ? Does delphi 2 have any such limits ?
0
Comment
Question by:andrewjb
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 3

Expert Comment

by:sperling
ID: 1335566
I've heard of this before, but haven't experienced it myself. I believe it has something to do with some internal limitations in the IDE debugger.

As far as I know you can't fix it... Consider DLLs is the best idea I can come up with.

I haven't experienced nor heard of any such problems in D2...


Regards,

Erik.
0
 
LVL 12

Author Comment

by:andrewjb
ID: 1335567
Current thoughts are that it might be something to do with the number of UNITS you've got, not their size. Although this sounds strange, someone else has indicated that a fix is to combine units into one.
0
 
LVL 3

Expert Comment

by:sperling
ID: 1335568
That might work, if the problem is that the "namespace" of the debugger is too small. I've also seen comments indicating that keeping the units in the same directory would help.

Regards,

Erik.
0
 
LVL 4

Expert Comment

by:nils pipenbrinck
ID: 1335569
At least I can help you with the breakpoint problem.

If you want to raise a breakpoint you can hardcode it into your
program. Just use these three lines:

  asm;
    int 3;
  end;

Int3 will be trapped by the debugger and will always work. But be sure you removed all these calls before you run the program without delphi. It'll crash!


0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 1

Accepted Solution

by:
miv earned 100 total points
ID: 1335570
It´s the length of the combined path of all your units which hits the roof in Delphi.
Shorten your paths or place all units in one dir near the root ex. c:\src\
You can, however, debug as it is now, just use a high level unit in the unit you wish to debug.
(Mail me if you did´nt get that :-) )

Ex.
UNIT LowLevelUnit;

USES
  HighLevelUnit;
0
 
LVL 12

Author Comment

by:andrewjb
ID: 1335571
Miv,
Interesting! Looks as though this might be helping. Two questions :
First, how did you find this out? Is there something documented somewhere, or was it by experimenting ?
Second, Sorry I didn't understand your 'include a high level unit' bit to get it to debug now. Could you explain again??

100 points are about to be yours!!.......

0
 
LVL 1

Expert Comment

by:miv
ID: 1335572
Found out the hard way - 350 units, 250.000 lines of code...

The units first parsed when you compile is low level units - file handling, math routines etc.
Your Mainform is prob. a very high level unit. (My own definition).

If you wish to debug f.ex. a math unit, place your mainforms unit name in the uses statement of the implementation in the math unit and rebuild. That should do the trick.

Happy coding, I hope Delphi 2/3 solves the problem.
0
 
LVL 1

Expert Comment

by:miv
ID: 1335573
What´s happening Andrew ?
0
 
LVL 12

Author Comment

by:andrewjb
ID: 1335574
Sorry, miv, just checking that it actually works.....
No problems so far. Still no reply from Borland!
Here are your points !
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now