Visibility of work areas, variables, viewing contents of objects

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
ThomasWYale
Posts: 43
Joined: Thu Jun 20, 2019 5:19 pm

Visibility of work areas, variables, viewing contents of objects

Post by ThomasWYale »

In a forum post dated February 19, 2021, the most recent one I could find, I read that X# development plans include "Runtime Debugging support with windows built in the Runtime to show workareas/cursors, globals, privates and settings".

I migrated a project in VO 2.8 SP4b with 88,035 lines of code via XSharp VOXPorter, then successfully eliminated all compiler errors. Some warnings appeared, most of which dealt with undeclared variables, which are actually field names in dbf's my application opens. After checking the compiler option "/undeclared", this did not prevent the application from running, save for a minor glitch in processing, which may be due to peculiarities in X# language.

In any event, when ran the debugger to examine this glitch, I attempted to view the contents of global and local objects, but globals were not present in the Locals treeview. I clicked the node "[+] <Globals>" but it's huge and look a long time to display, and none of the global variables my application constructs were present. I also opened the View DBF Work Areas to view the dbf's I opened (and they'd have to be open, otherwise my application wouldn't run at all), but the list was blank.

Have I installed XIDE incorrectly or has this feature not yet been implemented? I wonder whether this has to do with the lack of Visual Studio core editor, in addition to some of the other workloads (and I'm not sure which ones I would need, if any). I tried to download it, but the VS downloader froze up, even after repeated attempts.
ThomasWYale
Posts: 43
Joined: Thu Jun 20, 2019 5:19 pm

Visibility of work areas, variables, viewing contents of objects

Post by ThomasWYale »

De heer van der Hulst, is de feature toegevoegd? Ik zag dat je de post hebt bekeken.
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Visibility of work areas, variables, viewing contents of objects

Post by wriedmann »

Hi Thomas,
AFAIK this was a feature planned for the Visual Studio IDE, and since I personally don't use Visual Studio to develop in X#, but XIDE, I cannot say if that was implemented.
If you are working in XIDE: this is a project of the development team member Chris Pyrgas, and for sure he will answer your questions.
About debugging in XIDE: in some situations (specially when interacting with web services) the integrated debugger in XIDE does not works well. And in these situations, even not using Visual Studio, I start if up, and connect the debugger to my already running exe, and can use the Visual Studio debugger.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Visibility of work areas, variables, viewing contents of objects

Post by Chris »

Hi Thomas and Wolfgang,

Indeed, this area needs a lot of improvements. Regarding globals, the problem is that when you expand this node, it shows also DEFINEs (defined in any library), which are so many, which causes this huge delay. Not sure if it's possible to distinguish DEFINEs from GLOBALs in the debugger library, but I will look into it.

About the View Workareas menu option, this used to work nicely, but recently the RDD interface has changed in the X# runtime and has made this obsolete unfortunately.

Good news though is that the debugging windows have actually been implemented in the runtime! They are just not linked yet to the IDEs. But at least you can call them manually, even without debugging your app. In order to do this, add a reference to the library XSharp.RT.Debugger and then anywhere in your code call any of those functions (static methods):

XSharp.RT.Debugger.Functions.DbgShowGlobals()
XSharp.RT.Debugger.Functions.DbgShowWorkAreas()
XSharp.RT.Debugger.Functions.DbgShowSettings()

You can call them for example from a menu or a button event in your app, so they do not depend on if the debugger is actually attached.

So this should help you for now, but will look into improving the whole system for the next build.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
ThomasWYale
Posts: 43
Joined: Thu Jun 20, 2019 5:19 pm

Visibility of work areas, variables, viewing contents of objects

Post by ThomasWYale »

Thank you for your reply, Wolfgang. I'm still a little confused. I'm not yet interacting with web services, but "connect" the debugger? Isn't the debugger already part of XIDE? If you use neither XIDE nor Visual Studio, then what do you use to debug your programs? The old VO 2.8 software? I guess that's what I'll have to use. Still further, you say that you can use the VS debugger, but don't.
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Visibility of work areas, variables, viewing contents of objects

Post by wriedmann »

Hi Chris,
thank you very much for your answer!
I'm sure this will help.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Visibility of work areas, variables, viewing contents of objects

Post by wriedmann »

Hi Thomas,
XIDE make use of an open source debugging library, and sometimes this debugger does not works very well.
Until you are working with VO style applications the XIDE debugger works very well.
But there is another powerful debugger that is part of Microsoft Visual Studio, and even if you develop using XIDE (like I do for all my needs, even WPF and Windows Forms applications), you can always use the Visual Studio Debugger. For me is that the case in about 10% of my debugging needs (I have a lot of different projects, and some of them are interacting with web services).
When you need that, feel free to ask, and someone will explain how to do that.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ThomasWYale
Posts: 43
Joined: Thu Jun 20, 2019 5:19 pm

Visibility of work areas, variables, viewing contents of objects

Post by ThomasWYale »

Thank you very much for that information, Chris. So X# users do have available debugging information through this option!

I have one other question, though. Calling one or all of the DbgShow...() functions anywhere in the code (perhaps XApp:Start()?) seems easy enough, and I suppose wherever I set the breakpoints, those windows will be visible. But how does one add the XSharp.RT.Debugger reference to the library? Is it done through the IDE or some other way? Without the reference, I suppose I'd get an "out of context" compiler error.
ThomasWYale
Posts: 43
Joined: Thu Jun 20, 2019 5:19 pm

Visibility of work areas, variables, viewing contents of objects

Post by ThomasWYale »

Thanks, Wolfgang, I'll keep that in mind. My main goal now is to enable my application to work online, as opposed to a software download which many don't opt for.
ThomasWYale
Posts: 43
Joined: Thu Jun 20, 2019 5:19 pm

Visibility of work areas, variables, viewing contents of objects

Post by ThomasWYale »

Is it here? I was just roaming through the interface, clicked this node and right-click ed for this context menu.
Here.jpg
Here.jpg (53.23 KiB) Viewed 418 times
Post Reply