Page 1 of 1
Error inspecting in debug
Posted: Tue 31 Mar 2009 15:04
by 97itr217
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
Posted: Wed 01 Apr 2009 14:34
by Dimon
This problem is associated with application settings and not with MyDAC. You can find information about compiler setting and debugging in the BDS help.
Posted: Wed 01 Apr 2009 17:24
by 97itr217
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
Posted: Mon 06 Apr 2009 10:02
by Dimon
>> Could you tell me which exception I should ignore?
Please describe wherefore you need to ignore exceptions?
Posted: Mon 06 Apr 2009 14:00
by 97itr217
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?
Posted: Tue 07 Apr 2009 07:56
by Dimon
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.
Posted: Tue 07 Apr 2009 19:41
by 97itr217
... 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.