Graphical AutoIt Debugger

416 posts in this topic

#21 ·  Posted

Did you install the msi installer that has the runtime component needed also? 2 installers are used for the setup.

Share this post


Link to post
Share on other sites



#22 ·  Posted

Did you install the msi installer that has the runtime component needed also? 2 installers are used for the setup.

Äh no :">

But I did it now, and it works!

Thank you, MHz!

Share this post


Link to post
Share on other sites

#23 ·  Posted

No way clever or difficult (I tried to keep it as simple as possible). The file with additonal debug lines added sends variable names and values after each line has executed to the debug GUI through one of its methods. You can see if you look at the .debug.au3 file.

now i get it :geek:

and why the .Net Framework ?

(23Mb Runtime Libs would be too much for me...)

Is there a limitation in autoit that forced you to use vb or by personal choice?

... no offence, i realy like what you are doing here :o


CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

#24 ·  Posted

now i get it :geek:

and why the .Net Framework ?

(23Mb Runtime Libs would be too much for me...)

Is there a limitation in autoit that forced you to use vb or by personal choice?

... no offence, i realy like what you are doing here :o

No offense taken.

As for why .Net, well, the debug GUI is a COM component, which allows it to run with its own GUI outside of the execution of the script being debugged. That rules an AutoIt program out as you can't create COM components. After that, .Net is the logical choice because I have written a bunch of programs with it for other stuff.

I know that the .Net Framework is big (especially if you are using dialup), but you only have to install it once.


“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post


Link to post
Share on other sites

#25 ·  Posted

Hi Stumpii.

Why occurs this error when I'm debugging the 'test script.au3' file?

Posted Image

Thanks a lot.


Manel(foscmgt #20741)

Share this post


Link to post
Share on other sites

#26 ·  Posted

Hi Stumpii.

Why occurs this error when I'm debugging the 'test script.au3' file?

Thanks a lot.

Do you have the release version of AutoIt or the beta version installed? You will need to have the beta version to run the program.

If you have the beta installed, make sure that it is installed on the same drive as the release version. From the pic, it looks like you have in installed on D:


“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post


Link to post
Share on other sites

#27 ·  Posted

Do you have the release version of AutoIt or the beta version installed? You will need to have the beta version to run the program.

If you have the beta installed, make sure that it is installed on the same drive as the release version. From the pic, it looks like you have in installed on D:

Yes Stumpii. The problem was my Autoit3 version is 3.1.1 released at april-7-2005. :geek:

I downloaded and installed the beta version 3.1.1.111 and it works perfectly.

Thanks. I think Autoit Graphical Debugger is a great work. Congratulations. :o


Manel(foscmgt #20741)

Share this post


Link to post
Share on other sites

#28 ·  Posted (edited)

Stumpii, i hope you wont hate me for this :geek:

I modified your debugger so it doesent need com (and .net Framework)

and runs on autoit.

It doesent look as nice as yours.

Performance is still poor (on Large scripts)

And it based mainly on your code, so if you dont want something like this posted

drop me a line and i'll remove it.

There are some things i noticed while hacking around in your code:

on a line like:

$x = $x * $x
the variable is passed 3 times (wich is no real problem)

if the last line of the Script (thats beeing debuged) does not end with a linefeed

1 'AutoIt_Debugger_NextLine(...' is missing on the last line

and i didnt have the beta version in a /beta subdir because i use only the beta version.

i'm not sure if this is a common configuration so its up to you if you care about this ;)

the 'get the variables of autoit thru autoit' method isnt very efficient.

it would be better to plant a part of the debuger into autoit.

i took a look at the public source of autoit but since i have only very little c/c++ knowledge

i have no idea where variables are created and whats going on in there :o

Edited by piccaso

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

#29 ·  Posted (edited)

Monitoring hWnd variables works fine with your debugger if you turn them into a string

ElseIf IsHWnd($VariableValue) Then
        $oDebugWrapper.SendVariable($VariableName, String($VariableValue))
... somwhere inside the include file

but is crashes on structs.

for some reason IsArray() Returns True on Structs...

$struct = DllStructCreate("int;int")

And Multiple line with comments also lead into a crash...

$test = "1" & _; comment
        "2" & _; comment
        "3"
MsgBox(0,"",$test)
Edited by piccaso

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

#30 ·  Posted

Stumpii, i hope you wont hate me for this :geek:

I modified your debugger so it doesent need com (and .net Framework)

and runs on autoit.

It doesent look as nice as yours.

Performance is still poor (on Large scripts)

And it based mainly on your code, so if you dont want something like this posted

drop me a line and i'll remove it.

No problem. It really is a different program without the GUI. If you want to continue to work on it, it may be best as a seperate thead.

There are a couple of features missing that I thought were really useful. I don't know if you were going to add them. One is the ability to have breakpoints. Running a script with a GUI is not really possible with your version. The scripts gets stuck in the GUI event loop, and the GUI becomes unresponsive. The other is the ability to change variable values while the script is running, to that you can force the script down a path that it may not have gone down by default.

There are some things i noticed while hacking around in your code:

on a line like:

$x = $x * $x
the variable is passed 3 times (wich is no real problem)
Yes, this is one of those things to fix up some day.

if the last line of the Script (thats beeing debuged) does not end with a linefeed

1 'AutoIt_Debugger_NextLine(...' is missing on the last line

I will take a look at that. Thanks.

and i didnt have the beta version in a /beta subdir because i use only the beta version.

i'm not sure if this is a common configuration so its up to you if you care about this ;)

Some parts of the code will work if the beta is installed in a non default place, some wont. Something else to fix up too.

the 'get the variables of autoit thru autoit' method isnt very efficient.

it would be better to plant a part of the debuger into autoit.

i took a look at the public source of autoit but since i have only very little c/c++ knowledge

i have no idea where variables are created and whats going on in there :o

I didn't even want to mess with either. I know it is not efficient, but I wanted to keep it simple, so until I find a better way, it will have to stay. The most inefficient part is changing variables in the debugger, which as the script has to be paused to do anyway, I don't really see as a problem. The variable will be set before the user can continue the script.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post


Link to post
Share on other sites

#31 ·  Posted

Monitoring hWnd variables works fine with your debugger if you turn them into a string

ElseIf IsHWnd($VariableValue) Then
        $oDebugWrapper.SendVariable($VariableName, String($VariableValue))
... somwhere inside the include file
Good idea. I will look at that. Thanks.

but is crashes on structs.

for some reason IsArray() Returns True on Structs...

$struct = DllStructCreate("int;int")
Hmm, I had not even looked at that :"> . I will investigate. Thanks again!

And Multiple line with comments also lead into a crash...

$test = "1" & _; comment
        "2" & _; comment
        "3"
MsgBox(0,"",$test)
Yes, that is a limitation listed in the help file. Have not worked out a way to detect that. It looks easy (any line with '_ ;' at the end, but how to catch cases like 'IF $Test = "This is not a continuation line _ ;" then' which obviously is not a continuation line. Pickles my breain just thinking about the wierd combinations that would fail the test.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post


Link to post
Share on other sites

#32 ·  Posted (edited)

No problem. It really is a different program without the GUI. If you want to continue to work on it, it may be best as a seperate thead.

no i just wanted to try it ... :o

(didnt even realize that gui stuff doesent work)

maybe someday when my c/c++ is better ill try it there.

I think you missed my second post so i fixed some things myself.

(hope i didnt break something)

  • Multiple Lines with comments
  • Hwnd Monitoring
  • Crash with structs
  • Crash with Arrays that carry Hwnd
  • IsDeclared() was incorrectly used
  • Edit: Processing : #include 'file.au3' (the single quotes!)
Au3DbgFix.zip

I added ' ;Piccaso was here ' where i did editing for easy finding

And to finaly get on your nerves i have some suggestions to the debug gui :geek:

a goto line function would be nice

a search function would be very nice

a 'Run until next Return' would remind me of a asm debuger ;)

a 'Run until variable change' (like @error) would be usefull

Cheers

Edited by piccaso

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

#33 ·  Posted

oops...

you did read my second post.

i didnt see yours...

but why?

hmm...

i'll blame the forum :o

Bad Invision Board !!

my solution for multiple lines with comments slows things down a bit, but it seems to work...


CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

#34 ·  Posted (edited)

no i just wanted to try it ... :o

(didnt even realize that gui stuff doesent work)

maybe someday when my c/c++ is better ill try it there.

I think you missed my second post so i fixed some things myself.

(hope i didnt break something)

  • Multiple Lines with comments
  • Hwnd Monitoring
  • Crash with structs
  • Crash with Arrays that carry Hwnd
  • IsDeclared() was incorrectly used
  • Edit: Processing : #include 'file.au3' (the single quotes!)
Au3DbgFix.zip

I added ' ;Piccaso was here ' where i did editing for easy finding

I see where your changes are. Thanks, especially for the multiple lines with comments. That was a bit of code that I had no time or desire to mess with!

And to finaly get on your nerves i have some suggestions to the debug gui :geek:

a goto line function would be nice

a search function would be very nice

a 'Run until next Return' would remind me of a asm debuger ;)

a 'Run until variable change' (like @error) would be usefull

A goto line feature should be easy to add.

A search function should be pretty easy also.

There is a feature similar to 'run until next return' (if I understand you right). The step over function will run into and out of a function. You need to add a breakpoint on the line that calls the function, otherwise it will pass straight through. Is this kind of what you meant?

'Run until variable change' is a feature I am working on at the moment, so hold tight!

Thanks for your suggestions and fixes!

Edited by Stumpii

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post


Link to post
Share on other sites

#35 ·  Posted (edited)

Yes, that is a limitation listed in the help file. Have not worked out a way to detect that. It looks easy (any line with '_ ;' at the end, but how to catch cases like 'IF $Test = "This is not a continuation line _ ;" then' which obviously is not a continuation line. Pickles my breain just thinking about the wierd combinations that would fail the test.

Code to remove all comments and combine _ lines, remove empty lines

While 1
  $line = FileReadLine($file)
  If @error = -1 Then ExitLoop
;;$line = StringStripWS($line, 3)
  If StringLeft($line,15)='#comments-end' or StringLeft($line,3)='#ce' Then
    $cs = 0
    ContinueLoop;prevent #ce from appearing in the output
  EndIf
  If $cs = 0 And $line <> '' And StringLeft($line,1) <> ';' Then
    If StringLeft($line,15)='#comments-start' or StringLeft($line,3)='#cs' Then
      $cs = 1
    Else
    ; Check for line contiutations; if found, remove them
      If StringRight($line, 1) = '_' Then;get rest of line continued line
        $full = "";build up the entire line without line continues
        While 1
          $full = StringStripWS( $full & StringStripWS($line,3) , 3 )
          If StringRight($full,1) = '_' Then $full = StringTrimRight($full,1)
          $line = FileReadLine($file)
          If @error or StringRight(StringStripWS($line,3) , 1) <> '_' Then
              $text = $text & $full & StringStripWS($line,3)
              $line = '';prevents $text = $text & $line & @LF from duplicating text
              ExitLoop
          EndIf
        WEnd
      EndIf
      $text = $text & $line & @LF
    EndIf
  EndIf
Wend

Code taken from: UnTidy 0.1 - CyberSlug - 4 May 2004

The first AutoIt obsfucator I've seen on these forums...

#)

EDIT: Seems like piccaso has already dealt with that... nevermind...

Edited by nfwu

Share this post


Link to post
Share on other sites

#36 ·  Posted

Code taken from: UnTidy 0.1 - CyberSlug - 4 May 2004

The first AutoIt obsfucator I've seen on these forums...

He's (CyberSlug) Awesome!

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#37 ·  Posted

i'm getting a critical error -.-

i told it to send the error log, so i dunno if u can get it XD

anyways, it happens with all scipts and its no script error, but an program error (crash) i SHOULD have the latest beta (i downloaded recently)


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites

#38 ·  Posted (edited)

The debugger assumes you have a beta folder for your autoit3.exe, I just extract the beta files over the stable ones instead of making a new folder

EDIT: it would also be nice if it didnt auto exit when script is finished

Edited by Orks236

Share this post


Link to post
Share on other sites

#39 ·  Posted

How did you make it install itself like that... Im kinda new to this stuff :whistle:


- Dan [Website]

Share this post


Link to post
Share on other sites

#40 ·  Posted

I have been working on a graphical debugger for AutoIt scripts, and here it is.

Here is link to a web page for the program: Autoit Debugger

Your link isn't working anymore ? :-(

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now