Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Graphical AutoIt Debugger


  • Please log in to reply
407 replies to this topic

#21 MHz

MHz

    Just simple

  • MVPs
  • 5,723 posts

Posted 04 March 2006 - 02:57 PM

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







#22 qayqay

qayqay

    Seeker

  • New Members
  • 8 posts

Posted 05 March 2006 - 07:51 PM

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!

#23 piccaso

piccaso

    Rock me, Amadeus!

  • MVPs
  • 893 posts

Posted 05 March 2006 - 10:47 PM

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
Posted Image CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

#24 Stumpii

Stumpii

    Mr. Stumpii

  • Active Members
  • PipPipPipPipPipPip
  • 473 posts

Posted 05 March 2006 - 10:57 PM

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.

#25 foscmgt

foscmgt

    Seeker

  • Active Members
  • 24 posts

Posted 06 March 2006 - 12:43 PM

Hi Stumpii.

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

Posted Image



Thanks a lot.
Manel(foscmgt #20741)

#26 Stumpii

Stumpii

    Mr. Stumpii

  • Active Members
  • PipPipPipPipPipPip
  • 473 posts

Posted 06 March 2006 - 01:27 PM

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.

#27 foscmgt

foscmgt

    Seeker

  • Active Members
  • 24 posts

Posted 06 March 2006 - 11:29 PM

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)

#28 piccaso

piccaso

    Rock me, Amadeus!

  • MVPs
  • 893 posts

Posted 07 March 2006 - 07:20 AM

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, 07 March 2006 - 10:20 AM.

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

#29 piccaso

piccaso

    Rock me, Amadeus!

  • MVPs
  • 893 posts

Posted 07 March 2006 - 11:55 AM

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, 07 March 2006 - 12:08 PM.

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

#30 Stumpii

Stumpii

    Mr. Stumpii

  • Active Members
  • PipPipPipPipPipPip
  • 473 posts

Posted 07 March 2006 - 01:24 PM

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.

#31 Stumpii

Stumpii

    Mr. Stumpii

  • Active Members
  • PipPipPipPipPipPip
  • 473 posts

Posted 07 March 2006 - 01:33 PM

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.

#32 piccaso

piccaso

    Rock me, Amadeus!

  • MVPs
  • 893 posts

Posted 08 March 2006 - 10:27 AM

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!)
Attached File  Au3DbgFix.zip   21.23KB   855 downloads
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, 08 March 2006 - 11:43 AM.

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

#33 piccaso

piccaso

    Rock me, Amadeus!

  • MVPs
  • 893 posts

Posted 08 March 2006 - 10:30 AM

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...
Posted Image CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

#34 Stumpii

Stumpii

    Mr. Stumpii

  • Active Members
  • PipPipPipPipPipPip
  • 473 posts

Posted 08 March 2006 - 01:39 PM

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!)
Attached File  Au3DbgFix.zip   21.23KB   855 downloads
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, 08 March 2006 - 01:48 PM.

“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.

#35 nfwu

nfwu

    I'm not active on these forums

  • Active Members
  • PipPipPipPipPipPip
  • 1,234 posts

Posted 14 March 2006 - 10:31 AM

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
Plain Text         
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, 14 March 2006 - 10:32 AM.


#36 SmOke_N

SmOke_N

    It's not what you know ... It's what you can prove!

  • Moderators
  • 15,730 posts

Posted 14 March 2006 - 10:35 AM

Code taken from: UnTidy 0.1 - CyberSlug - 4 May 2004
The first AutoIt obsfucator I've seen on these forums...

He's (CyberSlug) Awesome!

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.


#37 zeroZshadow

zeroZshadow

    Autoit Veteran

  • Active Members
  • PipPipPipPipPipPip
  • 421 posts

Posted 04 August 2006 - 12:49 AM

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...

#38 Orks236

Orks236

    Seeker

  • New Members
  • 10 posts

Posted 05 August 2006 - 07:51 PM

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, 05 August 2006 - 07:54 PM.


#39 dandymcgee

dandymcgee

    Valik's #1 Fan

  • Active Members
  • PipPipPipPipPipPip
  • 812 posts

Posted 08 August 2006 - 04:42 PM

How did you make it install itself like that... Im kinda new to this stuff :whistle:
- Dan [Website]

#40 JoeCool

JoeCool

    Prodigy

  • Active Members
  • PipPipPip
  • 170 posts

Posted 14 August 2006 - 09:05 PM

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 ? :-(




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users