aztec
asked on
Debug not working
Hi, all of a sudden for some reason, I can't debug anything. I compile my program as usual, and the little dots go to the left of the executable lines of code, that's fine. So I click a dot to set a breakpoint, which turns the line red, as normal. But when I run my program, it flies right past the breakpoint without stopping! I'm using D6, enterprise version, trial.
Any thoughts?
Thanks
Shawn
Any thoughts?
Thanks
Shawn
In addition to Cynna's advice:
If the breakpoint remains valid during execution (the line is still red) then it's possible that execution never reaches the line.
Sometimes it's as simple as this...
Another idea:
Make sure you have 'Integrated debugging' option turned on in Tools\Debugger options dialog.
If the breakpoint remains valid during execution (the line is still red) then it's possible that execution never reaches the line.
Sometimes it's as simple as this...
Another idea:
Make sure you have 'Integrated debugging' option turned on in Tools\Debugger options dialog.
ASKER
Hello Cynna..
I tried another of my apps (a small one) and the debugging worked fine within that on. It is just within this app that it doesn't. And get this: My app uses several different screens or tabs. Debugging will work fine in one tab/screen, but won't in another tab/screen!
I followed your suggestions above (1) (3) and (4). For (2), I don't know how to check if there's a CR/LF at the end of each line. Just rename my .pas file to .txt and open in up in NotePad perhaps?
TOndrej: Yes, I am sure that execution reaches this point, but it still blows right by my breakpoint. And yes, "Integrated Debugging" was turned on.
Here's something else that's weird that might help you - you know how when you build your project, it puts all the little dots to the left of each line of executable code? OK, it does that all right, but when I do an F12 to show my form, and I go to another tab/screen via the Object Inspector, then double click on a button on that specific form (which takes me to that event handler), then all the dots on the left are gone... all the way down through my app's code!
Something very weird going on here...
Shawn
I tried another of my apps (a small one) and the debugging worked fine within that on. It is just within this app that it doesn't. And get this: My app uses several different screens or tabs. Debugging will work fine in one tab/screen, but won't in another tab/screen!
I followed your suggestions above (1) (3) and (4). For (2), I don't know how to check if there's a CR/LF at the end of each line. Just rename my .pas file to .txt and open in up in NotePad perhaps?
TOndrej: Yes, I am sure that execution reaches this point, but it still blows right by my breakpoint. And yes, "Integrated Debugging" was turned on.
Here's something else that's weird that might help you - you know how when you build your project, it puts all the little dots to the left of each line of executable code? OK, it does that all right, but when I do an F12 to show my form, and I go to another tab/screen via the Object Inspector, then double click on a button on that specific form (which takes me to that event handler), then all the dots on the left are gone... all the way down through my app's code!
Something very weird going on here...
Shawn
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think I have isolated the problem....things debug fine up until a certain line in my code. That line is:
fromfile.Destroy;
I am using a 3rd party component called TGPHugeFile, suggested to me by another expert. The component itself seems to be working ok, but it seems to be messing up the debugging. In the procedure containing this ine, I open up a TGPHugeFile like so:
fromfile:=TGpHugeFileStrea m.Create(i nfilestr, accRead);
...then I read from it like so:
ibytesOK:=fromfile.Read(bu f, bigchunksize);
then finally I close it up with the fromfile.destroy statement as mentioned above. Everything debugs fine until I hit this Destroy statement.
I can step while in debug, right up to this line, when I try to step OVER it, it will go into code of the GPHugeF unit....and from there on, I lose debugging control over my project.
Hope someone can help!
Thanks
Shawn
fromfile.Destroy;
I am using a 3rd party component called TGPHugeFile, suggested to me by another expert. The component itself seems to be working ok, but it seems to be messing up the debugging. In the procedure containing this ine, I open up a TGPHugeFile like so:
fromfile:=TGpHugeFileStrea
...then I read from it like so:
ibytesOK:=fromfile.Read(bu
then finally I close it up with the fromfile.destroy statement as mentioned above. Everything debugs fine until I hit this Destroy statement.
I can step while in debug, right up to this line, when I try to step OVER it, it will go into code of the GPHugeF unit....and from there on, I lose debugging control over my project.
Hope someone can help!
Thanks
Shawn
Hi aztec,
Experts-Exchange is performing an automated process to delete old questions. There have been no responses to this question, so it will be DELETED within 3 days.
Your points will be refunded.
If you still need the answer to this question, you should ask it again, as a new question. Your new question will appear at the top of the list, where many Experts will see it and respond. Here are some general tips on getting Experts to work on your questions:
=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=- =-=-=-=-=- =-=
1) Offer a high point level. Experts often concentrate on higher-valued questions.
2) Choose the best Topic Area -- target the experts who have the specific skills that you need.
3) Include keywords in the Question Title that will attract the right Experts.
4) Provide FULL DETAILS in the question body so the Experts can get right to work on a solution.
5) When an Expert does make a comment, be sure to be responsive.
For more information on Asking Questions, see http://www.cityofangels.com/Experts/Member.htm
For information on how to finalize questions, see: http://www.cityofangels.com/Experts/Closing.htm
=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=- =-=-=-=-=- =-=
Please DO NOT respond to this automated post. DO NOT ACCEPT THIS COMMENT AS AN ANSWER. Thank you for participating at Experts-Exchange.
CleanupGuy -- EE database cleanup volunteer
Experts-Exchange is performing an automated process to delete old questions. There have been no responses to this question, so it will be DELETED within 3 days.
Your points will be refunded.
If you still need the answer to this question, you should ask it again, as a new question. Your new question will appear at the top of the list, where many Experts will see it and respond. Here are some general tips on getting Experts to work on your questions:
=-=-=-=-=-=-=-=-=-=-=-=-=-
1) Offer a high point level. Experts often concentrate on higher-valued questions.
2) Choose the best Topic Area -- target the experts who have the specific skills that you need.
3) Include keywords in the Question Title that will attract the right Experts.
4) Provide FULL DETAILS in the question body so the Experts can get right to work on a solution.
5) When an Expert does make a comment, be sure to be responsive.
For more information on Asking Questions, see http://www.cityofangels.com/Experts/Member.htm
For information on how to finalize questions, see: http://www.cityofangels.com/Experts/Closing.htm
=-=-=-=-=-=-=-=-=-=-=-=-=-
Please DO NOT respond to this automated post. DO NOT ACCEPT THIS COMMENT AS AN ANSWER. Thank you for participating at Experts-Exchange.
CleanupGuy -- EE database cleanup volunteer
> ... I can't debug anything
Anything as "anything in my current app" or "any project at all" ?
If your answer is "only my current app" then try this:
1) delete any *.dcu, *.dsm, *.exe file in your project folder
2) Be sure *all* lines in your source files are terminated properly (CR/LF), especially if you copy/pasted some parts of the code from somewhere other then Delphi editor
3) Turn all debugging related options in your Project->Options->Compiler
4) Recompile your app