Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Debugger : Local variables handling
#1
I understand that using debugger (deb) you can view the content of the local variables, of the QM-item running, in the debug window. I would appreciate any advice on the following issues :

1. Is it possible to sort alphabetically the local variables of this QM-item. It is very useful if this item has a rather long list of variables.

2. It it possible to change using the debugger - at run time - the value of a local variable.

Any advice is mostly welcome. Thanks in advance.
#2
No.
#3
ssimop Wrote:1. Is it possible to sort alphabetically the local variables of this QM-item. It is very useful if this item has a rather long list of variables.

+1

Please Gintaras, it would be a very useful feature.

Regards.
#4
As a first approach towards an alphabetical sort, I have written the following routine which it transfer the content of the debug window to a string. Therefore, it is a matter of further processing of string "s". I give an example using notepad. I will report any further approach.

Function tempf06
Code:
Copy      Help
int w=win("Debug - thread" "#32770")
int htv=id(3002 w) ;;outline 'Variables'
str s
StringFromTreeView s htv ;; www.quickmacros.com/forum/viewtopic.php?p=21640
;Then process string s, for example
str sf="$temp$\Debug.txt"
s.setfile(sf)
run sf
#5
This is the version almost finalized. Is is still under tests. Any comments will be much appreciated.

Macro temp07
Code:
Copy      Help
function [int'sw]

;0 : Browse in Notepad
;2 : Alphabetical list of variables

int w=win("Debug - thread" "#32770")
,
int htv=id(3002 w) ;;outline 'Variables'

str s sl s0 root sIS
StringFromTreeView s htv
int i iq iexp

sel sw
,case 0
,str sf="$temp$\Debug.txt"
,s.setfile(sf)
,run sf
,
,case 2
,foreach sl s
,,iq=find(sl "=")
,,if iq<=0
,,,root=sl
,,,iexp=1
,,,continue
,,if iexp
,,,if sl[0]=VK_TAB
,,,,sl.remove(0 1)
,,,,sIS.formata("%s[]" F"{root}.{sl}")

,,,,continue
,,,else
,,,,iexp=0
,,sIS.formata("%s[]" sl)
,sIS.setfile("$temp$\DebugIS.txt")
,IStringMap m._create

,m.AddList(sIS "[61]")

,ARRAY(str) ak av
,m.GetAll(ak av)
,for(i 0 ak.len)
,,out "%-40s : %s" ak[i] av[i]

,,
,case else
,outt "Error in sw"
,end


Forum Jump:


Users browsing this thread: 1 Guest(s)