Local and Globals problem

Local and Globals problem

Postby fishy » Tue Jun 23, 2009 6:53 am

Hi there,

I found a problem while debugging with locals and globals.
I think you need a refreshing for the output variables.

Try something like this:
func fa()
Local $result = false
Local $test = fb()
; result seems to be manipulated by fb but is local there. Using the $result in a debug-output update works
return $result
endfunc

func fb()
Local $result = "hello"
return $result
endfunc

then do a calling:
Local $test = fa()

step through.
you see in fa result is set to false, when stepping into the fb (within the fa function) then result is shown to be "hello"
if the variable is used before returning the content is updated correctly.
Maybe you can refresh the variables after "comming" back from a func ( one step after EndFunc )

Greetings,
Fishy.
fishy
 
Posts: 17
Joined: Tue Jun 02, 2009 7:42 am

Re: Local and Globals problem

Postby thefoolonthehill » Fri Jun 26, 2009 11:07 pm

That is probably not possible because of how the debug code works.

I would recommend that you make global and local variable names different.

Steve
thefoolonthehill
Site Admin
 
Posts: 53
Joined: Thu Dec 18, 2008 3:45 pm

Re: Local and Globals problem

Postby fishy » Tue Jul 07, 2009 7:33 am

Making local and global variables same name is no solution. (Then i need no locals anymore. or i dont have to use globals)

nevermind... i just wanted to say that the debugger "variable" window needs a variable re-eval notification when leaving a function and stepping further in the calling function.

it's not that important. I have more problems with the "mass" of variables - and there's no filtering or something.
It makes debugging very ugly, when i have to scroll up to the @error and down to my changing variable again.
Maybe a "scroll to selection - aka scrollIntoView" would be nice if a variable changes.
It should be just one call - you also paint the changing variables red - so just scroll into view.

greetings,
fishy.
fishy
 
Posts: 17
Joined: Tue Jun 02, 2009 7:42 am

Re: Local and Globals problem

Postby thefoolonthehill » Tue Jul 07, 2009 7:56 pm

I will look at having the @error variables separate from the other because they should always be visible.

Steve
thefoolonthehill
Site Admin
 
Posts: 53
Joined: Thu Dec 18, 2008 3:45 pm


Return to AutoIt Debugger

Who is online

Users browsing this forum: No registered users and 1 guest

cron