can't debug DLL

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
cadenzaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mchaggisCommented:
are you attaching to the right process?

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cadenzaAuthor Commented:
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
OpitzSCommented:
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
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

cadenzaAuthor Commented:
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
OpitzSCommented:
I did this myself often enough, so it is possible. Do you use D4 S or P or C/S?

Sven
0
cadenzaAuthor Commented:
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
OpitzSCommented:
No Problem. Points to the right answer is the way it is handled.

Sven
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.