How to debug TEmbMyConnection in C++

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
easyblue
Posts: 64
Joined: Wed 02 Feb 2005 13:02
Location: Shanghai

How to debug TEmbMyConnection in C++

Post by easyblue » Mon 03 Jul 2006 06:26

Hello

MyDAC v4.30.1.15+BDS2006 SP2+Hotfixes

I have very stange problem now that the DataDir of the embedded connection component is throwing out exception in C++Builder project while fine in a delphi test project.
So I uninstalled the component and install the source code for debugging MyDAC components.
I have modified all the packages to generate all C++ files (-JPHNE option) for use in C++ project.
All components are successfully installed. And at delphi test project I can step into the pas file. But the breakpoint in pas seems always disabled in a C++Builder project.

Can any one help me how to step into pas file (DBAccess.pas etc) in a BDS2006 C++Builder project?

And any one have the same strange problem with me?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 05 Jul 2006 09:46

Are you able to debug any pas file that comes with BDS? For example DB.pas.

easyblue
Posts: 64
Joined: Wed 02 Feb 2005 13:02
Location: Shanghai

Post by easyblue » Thu 06 Jul 2006 01:40

Hello

Yes, I can debug DB.PAS, I can set the breakpoint correctly and step into it.
But the breakpoint in DBAccess.pas, such as the constructor of TCustomDAConnection.Create(), is always a failure, and can not step into it.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 11 Jul 2006 09:51

Try adding MyEmbConnection.pas unit to your project (Project | Add to Project).

easyblue
Posts: 64
Joined: Wed 02 Feb 2005 13:02
Location: Shanghai

Post by easyblue » Thu 13 Jul 2006 01:02

still does not work. It seems not possible to debug the MyDAC source code in C++2006 environment.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 13 Jul 2006 09:42

We are able to debug MyDAC source code under C++Builder 2006 even without including pas files into the project. Possibly your IDE catches up binary files instead of source files. The second possible reason is that you haven't enabled debug options when compiling packages.

Post Reply