table field values in debugger?

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
kevclark64
Posts: 127
Joined: Thu Aug 15, 2019 7:30 pm
Location: USA

table field values in debugger?

Post by kevclark64 »

Is there a way to view the field values of an open table in the debugger? For example, if I have an open table called masterlist and I want to see the value of the lastname field of the current record, it would be convenient to put masterlist.lastname in the debugger to view the value. Is there a way to do something like that?
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

table field values in debugger?

Post by Chris »

Hi Kevin,

It is possible, but it is still a little clumsy right now. You can type in the immediate window:

XSharp.RuntimeState.Workareas.CurrentWorkarea

and you will get info about the currently active table. You can view fields (by number) with

XSharp.RuntimeState.Workareas.CurrentWorkarea.GetField(1)

This is just a temporary workaround to do this, in the near future there will be a propel visual browser for viewing open tables while debugging. Rumor has it that it will be looking something like this :)
Attachments
DBEvaluator.png
DBEvaluator.png (19.88 KiB) Viewed 470 times
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

table field values in debugger?

Post by ic2 »

Hello Chris,
Chris wrote: This is just a temporary workaround to do this, in the near future there will be a propel visual browser for viewing open tables while debugging. Rumor has it that it will be looking something like this :)
In VS? Wow, that would be a huge improvement. One of the multiple steps back of VS versus VO is the almost unusable Immediate WIndow against VO's Ctrl X & database info during debug. If that would work for database inspection like your rumor upload this would already be great.

Is there also a solution planned running X# functions without having to guess which capitalization has to be used?


Dick
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

table field values in debugger?

Post by Chris »

Hi Dick,

In X#, you do not need to type the functions with the "correct" casing, the compiler finds them out anyway (unless you have explicitly told it not to, with a compiler options). In case you are talking about using X# functions from c#, in this case you'd need to talk to the people that develop this language :)

Yeah, the rumor I posted is heard more and more from various sources, so it's most likely a fact ;)
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
kevclark64
Posts: 127
Joined: Thu Aug 15, 2019 7:30 pm
Location: USA

table field values in debugger?

Post by kevclark64 »

A browser would be great. I often use complex SQL statements which would make it difficult to reference fields by number, but an integrated browser would be perfect.
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

table field values in debugger?

Post by Chris »

Hi Kevin,

We just had a team discussion about this, within the Virtual Fox Fest 2020 X# booth, and Robert had a very nice idea on how to implement this quickly enough. If there's no unexpected show stopper, I think this will be available in the next X# release.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply