jeudi 15 décembre 2016

C# ObjectDumper / Debug Dump Functionality

I have been looking at different 'ObjectDumper' posts, blogs and open source and cant seem to find what I am after. I am looking to find all objects in memory when the program is executing, objectdumper examples I have found require you to pass an object in.

In its simplest form, my question is how does the watch window work? When I enter an object or variable name it goes someplace to find if the object exists and if it does displays its contents. Can someone point me towards this object or collection used?

There might be a better approach though. If so I would like to go that route.

Here is a snippet of what is generated from our legacy foxpro applications and what I would like to create using C#. Specifically the object properties, I dont think the call stack will be hard to obtain, I havent looked into it yet.

PROC10 # proc10 * PROD * I:\Customers\ABCD\ Current Alias: IMPORT (H:\TEMP\00006HVT014A.TMP) Current Time: 12/15/2016 13:00:01


Call Stack:
1 Main (..\programs\main.prg; Line#: 23 )
2 Newmain (..\prod\newmain.prg; Line#: 162 )
3 Poapp.runprocess (..\prod_newmain.prg; Line#: 664 )
4 Poapp.oimport.commonimport ..\prod_import.prg; Line#: 561 )
5 Poapp.oimport.processimportmasks (..\prod_import.prg; Line#: 889 )
6 Poapp.oimport.processimportfiles (..\prod_import.prg; Line#: 1017 )

7 Poapp.oimport.oget.getdata (..\prod_import.prg; Line#: 7937 )
8 Poapp.oimport.oget.postouterloop (..\importclasses.prg; Line#: 1066 )

9 Poapp.oimport.oget.warning (..\prod___base.prg; Line#: 2005 )


Object Properties: _Screen.oPk .cAppfile = "program.EXE"

.cAppmode = "PROD"
.cCmd = ""
.cMachinetype = "PROCESSING"
.cToplevelapp = "I:\PROGRAMS\MAIN.FXP"
.cVersion = "2.0.0"
.iHandle = 1
.iRetval = 1
.lApplicationoverride = .F.
.lDevmode = .F.
.lError = .F.
.lSuccess = .T.
.Name = "OPK"
.nAttempts = 1






Aucun commentaire:

Enregistrer un commentaire