Firemonkey debugger problem for string value

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

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.
GrahamDLovellAsked:
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.

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

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

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.