Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Break points dont work

Status
Not open for further replies.

earlrainer

Programmer
Mar 1, 2002
170
0
0
IN
Hi,

I have run into a strange problem.

The breakpoints dont work in the program i.e. even if I put breakpoints ,the program never traps those breakpoints , but simply continues to work as if there were no breakpoints.

but If I remove some components ,then it starts functioning again.

Is it some problem with delphi 5 ?
Is there a limit on component number in a form ?
 
are you absolutelly sure that the program should stop on those breakpoints (e.g. the program has to execute the lines where you set breakpoints and the breakpoint conditions are satisfied)?

you can always pause the program then use F8 to resume and the program will enter any procedure called by any triggered event. this could give you a start to see what's causing the code not to stop on breakpoints...
 
You say that certain components seem to affect your ability to debug: Do you have the source available for them? You can manually set debugging options in your source with {$D+} (enable debugging) and {$D-} (disable). You can also use {$DEBUGINFO ON} or {$DEBUGINFO OFF}. If you don't have the source I suppose you could explicitly enable debugging in your own source code and try that.

Also unless you specifically need them, delete the follwing files:

.dsk - annoying project info that can get corrupt
.dcp - even more annoying when corrupt
.dcu - incase you have one with no debug info in it and your dsk/dpr somehow forces the IDE to use it!!

... Make sure that they refer to your own projects though!!!

I've found that Delphi has a habit of corrupting dsk and dcp files. The more annoying of the two is a corrupt or out of date dcp since, if you are tracing through a unit, you won't be aware its corrupt until you notice that its tracing through blank lines (i.e. if you add/remove source lines, they don't match up, yet yout dcp file insists on using the last compiled version. However if you only change half a line you will never know!!! This only applies if you are using packages though, and forcing Delphi to do stuff it wasn't meant for.

As a sanity test make sure you compiler debug info is enabled through the IDE (not that this will help you if your compnents explicitly disable debugging. (Project->Options->Compiler).

Taking thats ok, are you trying to debug an out of process com server and using XP? Delphi loses track of processes in XP and it can be a bugger to debug (have to reload modules, pointing to the correct dll (ALT+CTRL+M).

Hope this helps.
 
Hi,

the funny thing is that in normal programs when i compile and run I get blue dots on the bar on the left side of teh code.
but now they dont appear any longer.
 
it's because the code never gets to be executed (that's why the don't aren't there anymore)
 

I put a very simple showmessage('Hello') line in formactivate.

This gets execcuted i.e the programs shows the message.
but if i put a breakpoint here, it does not pause at this breakpoint.

This project has many forms.all the other forms show the blue dots except the main form which has actually become very big
 
I've had this quirky problem before. I can't remember exactly what I did but I have a feeling that I created a new project and copied everything across. Obviously this is impractical for large projects. If you haven't already try a token restart of your PC.

Hope this helps!

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
I had a similar problem for a while ago too.
I noticed, if I had two identical .pas files om my harddrive, and the first file was included in my project.
The other file was located in another (isolated directory) directory. (Same name, different directories)

I closed the first file (the one included) and opened the isolated version to check out som code. Then I closed the isoated file (But before I closed t, I added a breakpoint by misstake).
When I opened the first file again, no breakpoint was visible, but the application kept stopping at the same row, but in the wrong file...

Conclusion: Verify the filenames.


//Nordlund
 
I know that D3 can skrew up and put the dots in the wrong places, never seen them missing altogether.
and D4 has never done it.


Steve
Those who know me have no need of my name. SD
 
I don't think it has anything to do with a maximum number of components on a form. I've made one application that has 233 components on one form and another 189 on another form and works just fine.

[bobafett] BobbaFet [bobafett]

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
 
I've seen this in one other instance - using packages and the code that I'm testing is in a .bpl (package) which is being called by another program. Especially in Delphi 4 and 5, sometimes it would work fine and other times it would just stop "seeing" the breakpoints in the package.

I tend to think, though, that probably one of the components has debugging turned off and if you explicity turn debugging on in the Implementation section of your unit with {$D+} as sixtoesofdean mentioned.

-D
 
I have a D5 project with over 2800 components - no breakpoints.

I'm in the process of moving it to D7, where it spends an hour+ with 98% CPU trying to do anything - code completion, compile . . .

In D7, if I delete enough components to get under 2000, it comes back in 3-5 minutes. Working on it.

Sue
 
Fixed my own problem. Had multiple views that didn't belong on a bunch of cxGrids. Now the project has about 320 components & it's FAST again.

Sue
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top