Sign in to follow this  
Followers 0
martin

AutoEditDebugger

75 posts in this topic

#1 ·  Posted (edited)

post-3602-1199735240_thumb.pngpost-3602-1199734671_thumb.pngpost-3602-1194731872_thumb.png

post-3602-1194728732_thumb.pngpost-3602-1194729956_thumb.png

EDIT October 2009: NB This script has not been maintained since some time in 2008. Due to some problem with the editor it crashes in Vista.

Features

  • An editor ( RazerM's AutoIt Editor.)
  • Run script to be debugged as production or Beta version of AutoIt
  • Step over or into next line (ie step to next line in script or step to next executed line.)
  • Halt,Step or Run at any time
  • Stop at Line Number. Up to 4 lines.
  • Conditions can be applied for stopping at each line, line numbers and condition are saved.
  • Lines highlighted when stopped or stepping.
  • Any variables can be displayed. Variables names are Saved.
  • A function can be displayed showing all it's parameters, their last set values, plus the last return value if any and the value of @Error when the function last returned.
  • Debug options for each script can be set as well as defaults for any script.
  • Reasonable speed. (Most scripts won't appear to be any slower.)
  • Consolewrite lines in the script will still work while being debugged.
  • Any number of sections of the script can be excluded for debugging.

    (#debuglinesoff to turn off, #debuglineson to turn back on)

Credits

I used many ideas taken from klaatu's debugger, which in turn took ideas from stumpii.

I have built the debugger as an extension to RazerM's excellent editor.

Compiling

Scripts can be compiled if desired. If one is compiled it is assumed that all are compiled

The scripts to compile are AUTOEDITDEBUGGER.AU3, AUTOMONITDB.AU3 and MGDEBUGIT001.AU3 which should be compiled to

AUTOEDITDEBUGGER.EXE, AUTOMONITDB.EXE and MGDEBUGIT001.EXE.

Download

You can get the zip file here Get_Editor_Debugger10B.zip (last update 6th July 2008)

This unzips to give a link for the main download.

NB this version is working with AutoIt production 3.2.12.1 or AutoIt Beta 3.2.13.3,

Most downloads of a single version is 489.

Running

The script to run is AutoEditorDebugger.au3, or if you use the version on or after 22nd Dec and compile then the exe to run is AUtoEditorDebugger.exe.

History (Last 4 versions)

28th July 2008 (zip10B)

Fixed some minor bugs and included latest version of SciLexer.dll

29th June 2008

Updated for production version 3.2.12.1 (zip9)

29th January 2008

Changed so that no need for Beta version of AutoIt, and defaults set to production. (zip8)

See post #44 for details if you want to change your version without a new download.

7th January 2008

Changed the Line Breaks so they can be set for any script when a script is not being debugged. Can now set the Line Breaks and conditions before starting the script.

Improved speed of stepping again. (Don't think it will ever go faster.)

Display of @error value when function last returned added to function listview.

Removed some problems opening and closing files.

Removed a couple of minor bugs. Enter key works as expected again when entering a variable to be monitored.

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites



You commented out some Globals in ModernMenu.au3 that makes it error here when ran.


[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

You commented out some Globals in ModernMenu.au3 that makes it error here when ran.

Oh. I think that might be because in the latest version of AutoIt those variable are already defined. I'll try to work out a way round it. Have you any suggestions?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Not really, we can't run it.

Share this post


Link to post
Share on other sites

Not really, we can't run it.

Do you have the same problem as SmOke_N?

What version of AutoIt are you running?

(This has got to be my shortest lived script ever! <_< )


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

v3.2.8.0

Share this post


Link to post
Share on other sites

Do you have the same problem as SmOke_N?

What version of AutoIt are you running?

(This has got to be my shortest lived script ever! <_< )

LMAO, nah, all I did was uncomment the commented globals in the before mentioned .au3 include, and in that same .au3 include I added from A3LImageList.au3
Global Const $ILC_MASK              = 0x00000001
And it ran fine

[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

LMAO, nah, all I did was uncomment the commented globals in the before mentioned .au3 include, and in that same .au3 include I added from A3LImageList.au3

Global Const $ILC_MASK              = 0x00000001
And it ran fine

Great, I'm not the only one it works for then. <_<

Thanks for that SmOke_N.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

I got it to work now, but I really don't see any thing different than RazerM's editor.

Share this post


Link to post
Share on other sites

I got it to work now, but I really don't see any thing different than RazerM's editor.

When you first run it there should be only one difference which is a singlebutton with a gearwheel icon, and a hint which says "Debug the current script".

Do you have that button?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Oh, yes I do. I'l try it!

Share this post


Link to post
Share on other sites

Works Ok for me Martin, well mostly.

This could be very useful. Nice work.

Single stepping works fine.

Stop at line does not work for me. The script just runs through to the end

A small suggestion:

Keyboard shortcuts for Single Step, Continue, Stop etc. I find it easier to keep my finger on a key than the mouse over a button.


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Share this post


Link to post
Share on other sites

Works Ok for me Martin, well mostly.

This could be very useful. Nice work.

Single stepping works fine.

Stop at line does not work for me. The script just runs through to the end

If stop doesn't stop can you tell me are you sure the line you entered did have code on it, was the check box ticked and the background to the line number in yellow? and did you have any lines with debugging turned off which could explain it?

Also, does the script stop if you click the pause button?

Apart from clicking pause to halt a script you can click step and it will go into step mode.

A small suggestion:

Keyboard shortcuts for Single Step, Continue, Stop etc. I find it easier to keep my finger on a key than the mouse over a button.

OK, Yes keyboard shortcuts are on my list; I like them too. I plan to use smashly's idea for combining icons and text on buttons.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Ha ha, I must have downloaded in the middle of something, I had to ad

Global $ILC_MASK             = 0x00000001

to my ModernMenu files.. LOL

Edited by gesller

Share this post


Link to post
Share on other sites

No, Martin accidentally commented that out.

Share this post


Link to post
Share on other sites

Stop at line does not work for me. The script just runs through to the end

Sorry Bowmore and anyone else who downloaded the duff version, the 'stop at line' didn't work.

Now fixed I hope, new link in the first post.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Sorry Bowmore and anyone else who downloaded the duff version, the 'stop at line' didn't work.

Now fixed I hope, new link in the first post.

New version works fine without any tweaks to constants or includes

Stop at line now working as expected

I'm looking forward to following your progress with this project.

Thanks

Bowmore


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

Don't understand how to get it to work

Hi, I downloaded the zip file today and tried to run it. Except for mgDebugIt001.au3 I couldn't get it to do anything.

I'm really looking forward to use this Debugger (I've been combing the net for a debugger for Autoit, and so far this looks like my best chance), but can anyone give me some pointers how to get it to run and work?

I'm using the latest AutoIt Version (v3.2.8.1)

Thanks in Advanced.

Edited by Shy

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

Don't understand how to get it to work

Hi, I downloaded the zip file today and tried to run it. Except for mgDebugIt001.au3 I couldn't get it to do anything.

I'm really looking forward to use this Debugger (I've been combing the net for a debugger for Autoit, and so far this looks like my best chance), but can anyone give me some pointers how to get it to run and work?

I'm using the latest AutoIt Version (v3.2.8.1)

Thanks in Advanced.

In my original post I said

The script to run is AutoEditorDebugger.au3

If that doesn't work for you then I suspect that it's because I have made it work with the version 3.2.9.3, so the quick solution is to update your 'latest version 3.2.8.1' to a later latest version. <_<

If you have any errors when you try to run it then I would expect that it's because some constants aren't declared; there are a lot more in the latest versions of constants.au3 and guiconstants.au3.

mgDEbugit001.au3 when run by itself will ask for a file and then convert it to the debugging version. mgDEbugit001 is normally run by Automonitdb.au3 which passes it parameters so it doesn't need to ask for the file, and Automonitdb in turn is run by AutoEditorDebugger.

If you have other problems then you need to tell me exactly what they are and I will try to sort them out.

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

I get this:

AutoIt Error:

Line 108 (File "C:\Documents and settings\Jar\Desktop\AutoEditorDebugger2\AutoEditorDebugger.au3"):

Run($ToRun)

Error: Unable to execute external program.

The System cannot find the file specified.

Edited by JustinReno

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
Sign in to follow this  
Followers 0