Graphical AutoIt Debugger

416 posts in this topic

Posted (edited)

Here is the first new issue of the debugger for a long time!

Posted Image

Error List:

Posted Image

Variables:

Posted Image

Tool Chest:

Posted Image

Class Viewer:

Posted Image

Features:

  • Automatic updates.
  • COM operation replaced with Windows messaging (script no longer closes when program finishes).
  • Output window, showing Console output.
  • Automatic program tracing.
  • Toggle between Release and Debug AutoIt.
  • Script editing using ScintillaNET editor (looks and feels the same as SciTE).
  • Single step debug through your script and #include files.
  • Debug script in compiled (exe) or script (au3) form.
  • View and modify variable values while your program is running. Allows you to test all parts of you program.
  • Breakpoints (toggled by clicking on the line number). Breakpoints are stored between sessions.
  • Scripts can be debugged by right clicking on the au3 file, running the debugger from the Start>Programs menu, from UltraEdit/UEStudio by using AutoIt4UE, or from within SciTE with this mod.
  • Portable version (just install and select 'Portable' instead of 'Full').
  • Automatic Context Check option.
  • Access to 3rd party tools (Context Check, Koda, open in SciTE, Run script, Compile script, Tidy, Code Wizard).
  • Easy switch between Release and Beta AutoIt.
  • Syntax highlighting in either SciTE, or Visual Studio style.
Upcoming features (don't hold your breath though!):

  • Detection of changes in the script and prompt to automatically reload
  • Variable breakpoints (stop if x>1, or @error=1)
  • Variable value tooltips in the code window
  • Some method of jumping back in the script to an earlier line without restarting. Don't really know if this is possible without the GOTO command.
  • Some sort of variable value popup window to allow long strings to be viewed
  • Run to Cursor option in code window
Here is link to a web page for the program: Autoit Debugger Edited by Stumpii

Share this post


Link to post
Share on other sites



Posted

Nice idea, can't say much for the Script or Scrap :o (there is none... :geek:). I'm sure this idea will come in handy for ALOT of people. (The title of the thread is a bit misleading, but I got it when I looked at your screen shot).

Share this post


Link to post
Share on other sites

Posted

Nice idea, can't say much for the Script or Scrap :o (there is none... :geek:). I'm sure this idea will come in handy for ALOT of people. (The title of the thread is a bit misleading, but I got it when I looked at your screen shot).

SmOke_N took the words right from my fingers!!!

8)

Share this post


Link to post
Share on other sites

Posted

Can you post an alpha version for others to use?

-Livewire

Share this post


Link to post
Share on other sites

Posted

I'd like to try it out. If it's usable, then please post the code. I'm sure others would like to use, too. :o

Share this post


Link to post
Share on other sites

Posted

No alpha version as yet, but maybe soon. I am also putting a web page together to explain a bit about it.

It is true that there is no script/scrap, but the forum index says 'script/scrap or application', so I thought that this would be the best place to put it (except the chat forum, maybe, which not everyone may read).

Anyway, this program will actually be a complete application, not just a script. The main part of the program is a .Net application acting as a COM component, which the user's script (being debugged) communicates with using an #include file and some jiggery-pokery inside the user's script. If any of that makes sense. Bottom line is that all you should have to do is install the file and run an exe with the path of the script to be debugged in the command line.

At the moment, the code works ok, but needs an installer to allow anyone else to use it. That is my next step!

Share this post


Link to post
Share on other sites

Posted

I am really looking foward to this! :o This is a very nice idea, similar to Dev-C++'s debugging style.

Share this post


Link to post
Share on other sites

Posted (edited)

Added a link to the new web page to the first post (also here).

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

Note that none of the links work!

Edited by Stumpii

Share this post


Link to post
Share on other sites

Posted (edited)

Added a link to the new web page to the first post (also here).

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

Note that none of the links work!

Well I decided to give it a try, ran into a problem right away.

Tried to run it with the test script you have and here's what happened.

Would of looked at it, but the source wasn't supplied.

Gary

Edited by Jon

Share this post


Link to post
Share on other sites

Posted

OK, thanks.

I have fixed that problem already, but adding a new feature in broke something else, so I am fixing that. I should have a new version in the next couple of days. I will then post the source as well (though it probably won't be useful to anyone).

Share this post


Link to post
Share on other sites

Posted

though it probably won't be useful to anyone

please post it.

... would be interesting to read :o

Share this post


Link to post
Share on other sites

Posted

Looking forward to the release too!

BTW: Why did you choose the .NET framework for this app.

Even dependencies like VB Runtimes, MFC etc. are not desirable.

and Its really a pain to install the .NET 2.0 framework.

I think that's the reason why we all like AutoIt so much.

Share this post


Link to post
Share on other sites

Posted

Looking forward to the release too!

BTW: Why did you choose the .NET framework for this app.

Even dependencies like VB Runtimes, MFC etc. are not desirable.

and Its really a pain to install the .NET 2.0 framework.

I think that's the reason why we all like AutoIt so much.

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.

This program is really a seperate addon program, like SciTe, rather than an addition to any existing script, so just like you have to install SciTe, you have to install this. I know that the .Net Framework is big (especially if you are using dialup), but you only have to do it once.

Share this post


Link to post
Share on other sites

Posted

I have put a new version on the website (refer to 1st post). I have been running it for last few days and had no problems so far. Thanks go to Livewire who has been a great help.

Make sure that you look through the help file that is included as there is a bit more info than there is on the website.

For those that were looking for the source, I have added a link at the bottom of the web page. Please read through the help file at the tech bit that covers how the program works, otherwise you will probably not figure out how the four parts work together.

Let me know if you experience any problems. Also any comment would be appreciated, especially around how the variables appear. At the moment is just a big list of all the variables and I want to change it eventually.

Share this post


Link to post
Share on other sites

Posted

My suggestions:

1. Try out to skip blank lines.

2. Show variables just on user request.

Many thanks for the debugger.

Regards

Peppe

Share this post


Link to post
Share on other sites

Posted

how did you get out the variables?

Share this post


Link to post
Share on other sites

Posted

how did you get out the variables?

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.

Share this post


Link to post
Share on other sites

Posted

Of the standrad set of debugging tools you have the following already:

-Next Step(Step Over)

-Step Into

A few more which come with most good debuggers out there are:

>Continue (Run the script as normal until end OR you hit a breakpoint OR an error)

>Run To Cursor (Self-explanitory)

>Set/Un-set breakpoints

Also, for a big script, there are plenty of variables. maybe sorting the variables in a heracial order will be easier fot the users. For example:

@error = 0
@extended = 0
Global 
+- $ny_global_var = 70
+- $testvar = 0
+- FUNC _SetValue
   +- $param1 = 300
   +- $param2 = "This is a string"
   +- $local_var = True
   +- FUNC _Switch
      +- $t = 300
      +- $param1 = 300
      +- $param2 = "This is a string"

For code like

Global $ny_global_var = 70
$testvar = 0
_SetValue(300, "This is a string")

Func _SetValue($param1, $param2)
    Local $local_var = True
    _Switch($param1, $param2)
   ;;; ...
EndFunc

Func _Switch(ByRef $param1, ByRef $param2)
    Local $t = $param1;;;;;;;;;;;;;;;;;;DEBUGGER IS AT THIS POINT
    $param1 = $param2
EndFunc

#)

Share this post


Link to post
Share on other sites

Posted (edited)

Of the standrad set of debugging tools you have the following already:

-Next Step(Step Over)

-Step Into

A few more which come with most good debuggers out there are:

>Continue (Run the script as normal until end OR you hit a breakpoint OR an error)

>Run To Cursor (Self-explanitory)

>Set/Un-set breakpoints

Also, for a big script, there are plenty of variables. maybe sorting the variables in a heracial order will be easier fot the users. For example:

Code...Where you at?
Thanks for the suggestions.

The debugger does have run to end and run to breakpoint already. Run until error was one of the things I was thinking about (actually implementing conditional breakpoints based on values and hit counts, which would include @error. This would also include setting and unsetting breakpoints also).

The variables are an issue. In the next release, there will be another 'Variables Watch' window that will contain the variables that you want to see. The existing variables window will have checkboxes so that you can select which variables you want added to the watch list. As I have implemented the sessions code, I will be able to store the selected variables across debug sessions, so that you don't have to add them each time.

This new verison is a little way off at the moment.

@gcriaco: Have implemented optional skipping of comment lines and/or blank lines. Next version again.

Edited by Stumpii

Share this post


Link to post
Share on other sites

Posted

Please help!

I allways get the following error:

"Error 429. In routine 'Class_Initialize'

Objekterstellung durch ActiveX-Komponente nicht möglich"

What do I do wrong??? :o

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