Firemonkey debugger problem for string value

I cannot see the result of a string assignment in the debugger:
procedure TfMMain.AudioPlay(WordStr: string);
  AudioFile: string;
  AudioFile := fMMain.cdsWords.FieldByName('AudioName').AsString;
  if AudioFile = '' then
    MessageDlg('Audio not available for this word',TMsgDlgType.mtInformation,

Open in new window

The debugger tells me the correct values for fMMain.cdsWords.FieldByName('AudioName').AsString;
but displays garbage value for the local value "AudioFile".

Is this a known problem / feature, or am I doing something wrong?

The debugger works OK if I attach the value directly to the form.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Sinisa VukSoftware architectCommented:
which version of Delphi you use? Make sure than you disable optimization in Options.
GrahamDLovellAuthor Commented:

I disabled optimization in Compile options, and Built the project.

When running, instead of seeing garbage, I now get "Inaccessible value". This may not be due to turning off optimization, since I think I got that once before.
Sinisa VukSoftware architectCommented:
do you see something in debug window/local variables?
try to apply andy's IDE Fix Pack 5.92
this one patch some nasty problems - maybe this one too as a result....

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
GrahamDLovellAuthor Commented:
Yes, I have also lost my local variables in the debug window.

I don't think I will apply the patch - I will just use my workaround (of adding the variable into the form), where required.

Thanks for the info.
GrahamDLovellAuthor Commented:
Thanks for the expert advice on Firemonkey IDE.
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

From novice to tech pro — start learning today.