Error inspecting in debug

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
97itr217
Posts: 19
Joined: Tue 31 Mar 2009 14:54
Location: Canada

Error inspecting in debug

Post by 97itr217 » Tue 31 Mar 2009 15:04

I am new here but did search the forum for my question. My problem is that during runtime, I want to inspect the value of myQuery->FieldByName("XXX")->AsString but couldn't. If I hover the mouse onto the code, BDS Debugger doesn't show the hint. If I do Shift-F5, debugger displays an error dialog saying "Error inpsecting 'dataModule->myQuery->FieldByName("XXX")->AsString' : E2451 Undefined symbol '_fastcall Db::TDataSet::FieldByName(const System::WideString)'

I have installed :
Windows XP SP2
BDS 2006 Version 10.0.2166.28377
MyDAC Professional Edition version 5.55.0.37 for Delphi 2006

Please shed some light as this is very inconvenient when debugging code.
DW

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 01 Apr 2009 14:34

This problem is associated with application settings and not with MyDAC. You can find information about compiler setting and debugging in the BDS help.

97itr217
Posts: 19
Joined: Tue 31 Mar 2009 14:54
Location: Canada

Post by 97itr217 » Wed 01 Apr 2009 17:24

Thanks Dimon. Could you tell me which exception I should ignore? I check the list but couldn't find any info relates to that. Currently I have these enabled in the Language Exceptions list:
- VCL EAbort Exceptions
- Indy Silent Exceptions
- Microsoft DAO Exceptions
- System.Threading.SynchronizationLockException
- System.Threading.ThreadAbortException
- CLR Exceptions (System.Exception)

Also after trying lots of different things, I discovered that if I evaluate dataModule->query->FindField("XXX")->AsString in the Evaluate/Modify box, the debugger would return the proper value of the field. This is my workaround for the moment but it would be nice to find a permanent solution.
Thanks
DW

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 06 Apr 2009 10:02

>> Could you tell me which exception I should ignore?

Please describe wherefore you need to ignore exceptions?

97itr217
Posts: 19
Joined: Tue 31 Mar 2009 14:54
Location: Canada

Post by 97itr217 » Mon 06 Apr 2009 14:00

Please describe wherefore you need to ignore exceptions?
I guess I must have mis-understood when you said "application/compiler settings" in your earlier post, I thought you meant the Exception-to-ignore list.
All I wanted to do is to be enable to inspect field values in the TMyQuery object (ex: dataModule->myQery->FieldByName("xxx")->AsString) while debugging. Which debugger setting should I set or enabled?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 07 Apr 2009 07:56

Open the Project->Options menu and the Compiler tab. Make sure that the "Stack frames" item is checked. Also check all items in the Debugging group box except the "Definitions only" item.

97itr217
Posts: 19
Joined: Tue 31 Mar 2009 14:54
Location: Canada

Post by 97itr217 » Tue 07 Apr 2009 19:41

... the Project->Options menu and the Compiler tab. Make sure that the "Stack frames" item is checked. ...
Thanks for your suggestion, but the debugger still pops up E2451 error after I have enabled the recommended settings.
At this point, I am leaning more towards a BDE problem because I noticed that inspecting Label1->Caption also result in the same error. The error is "Error inspecting 'Label1->Caption': E2451 Undefined symbol '__fastcall Db::TDataSet::FieldByName(const System::WideString)'". However, inspecting Label1->Top will not.
What puzzled me is that if I inspect datamodule->TMyQuery->FindField("xxx")->AsString, the debugger behaves properly (ie: display value as hint or in dialog window). I guess I will just live with this "un-documented" features and continue my work.

Post Reply