?
Solved

can't debug DLL

Posted on 2000-01-25
7
Medium Priority
?
375 Views
Last Modified: 2011-11-03
Hi,

I am trying to debug (Delphi 4.03) a DLL which is dynamically loaded by an application. I used to be able to use the debugger on this DLL, but now, all of a sudden, it is no longer possible to set valid breakpoints. Only some source lines (constructor/destructor, non-object procedures) have the blue dot in the gutter after a full build (this used to be for nearly all lines, as far as I recall).

All debugging options are checked (for the DLL as well as for the main app + integrated debugging on), optimization off. It seems to make no difference if 'build with runtime packages' is on or off. Probably I changed something (like a search path or so), but I can not figure out what it is.

Does anyone have an idea what is going on?

Wim
0
Comment
Question by:cadenza
  • 3
  • 3
7 Comments
 

Accepted Solution

by:
mchaggis earned 300 total points
ID: 2384691
are you attaching to the right process?

are you priviledged enough to register the just-in-time debugger?
0
 

Author Comment

by:cadenza
ID: 2384892
Hi mchaggis,

> are you attaching to the right process?

what I do (and always did) is (everything in the Delphi IDE):
- build my DLL
- build my main app
- set a breakpoint in the DLL source
- run the main app, which loads the DLL dynamically. i can see this happens correctly

This used to produce valid breakpoints and execution stopped on the breakpoint in the DLL. Now, however, the breakpoint is always marked as an invalid one (and execution does not stop there, of course).

> are you priviledged enough to register the just-in-time debugger?

this sounds NT to me, I am using Win98. (but I recently upgraded from Win95. could this be relevant?)

There are no restrictions as far as path of sources of main app and DLL is concerned, are there?

Wim


0
 

Expert Comment

by:OpitzS
ID: 2385131
You should recompile the whole dll, but not by using F9 key, but by using menu Project|Create <Your dll name>. then optimization should be gone.
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 

Author Comment

by:cadenza
ID: 2385385
Hi OpitzS,

so I did (many times, actually), but to no avail.

In the meantime I discovered it has nothing to do with my upgrading from Win95 to Win98, since I started this development after the upgrade.

Uh: you DO agree that it should be possible to debug a dynamically loaded DLL in the IDE, don't you? Or am I wrong here?

Wim
0
 

Expert Comment

by:OpitzS
ID: 2385515
I did this myself often enough, so it is possible. Do you use D4 S or P or C/S?

Sven
0
 

Author Comment

by:cadenza
ID: 2385612
McHaggis:

you were right indeed! I first did not fully understand what you meant, but later I realised where I had to look, and indeed found a mistake there.

Opitzs:

Thanks for your time. + sorry, but McHaggis put me on the right track, so he deserves the points.

Cheers,

Wim
0
 

Expert Comment

by:OpitzS
ID: 2389860
No Problem. Points to the right answer is the way it is handled.

Sven
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
Suggested Courses

599 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