Jump to content

Graphical AutoIt Debugger


Stumpii
 Share

Recommended Posts

If I could work how to control it, I would! I will take a look.

What do you mean auto tabbing? I try not to use SciTE as much as possible.

Stumpii

dont think this was ever guna be a replacement for SciTe, i just use it when i have a headache with a bug, just a hot key away :P

keep it up Stumpii :unsure:

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

  • 2 weeks later...

My "2 cents" suggestions:

Variables:

the variables panel should have to show just variables set by user (maybe optionally).

Now this panel lists any variable that appears in debugged statements. IMHO users are interested in just a few variables of the script, and sometimes it's difficult to have a look to a long variables list.

Focus on the debugged line:

if you click on other statements during a debug session, the yellow line is moved near the mouse pointer, and you can't see which is the current debugged statement. The only way to see the current debugged line is to cick on the "Step into" button. So,it would be very nice showing the current debugged line in some way in any circumstance.

Think that the debugger shouold be sticky.

Many thanks for this tool and keep up the good work

Peppe

Link to comment
Share on other sites

Opening Koda seems to freeze the Debugger for me.

The debugger waits for Koda to close, so that it can reload the script with any changes made by Koda.

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.

Link to comment
Share on other sites

Oh haha, that could get aggravating for multi taskers like me :P

At some point I will add a file watcher system to check for external changes and prompt to reload. At that point, it would be possible to do what you want. So, watch this space!

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.

Link to comment
Share on other sites

At some point I will add a file watcher system to check for external changes and prompt to reload. At that point, it would be possible to do what you want. So, watch this space!

Stumpii

Grate work you did. Thank you for sharing those.

------------------------------------------------------"You are never a loser,until you quit trying"------------------------------------------------------

Link to comment
Share on other sites

Stumpii,

My last suggestion was a little unclear. I think what I ment was auto-indention, not tabbing (lol). I have another suggestion, maybe an x button on the file tabs, like the firefox tabs, and maybe be able to move them around like in firefox. And maybe a context menu for when you right click the tabs o.O

Link to comment
Share on other sites

Request for New Feature

In addition to the production and beta include directories would it be possible to add the option to specify a user include directory.

I have a number of specialized UDF and tweaked standard UDF which I keep in a separate directory to avoid problems when updating AutoIt. To use the debugger I currently have to use the full path in the include statement which is a bit inconvenient as I run AutoIt and the debugger as portable apps on a USD hard drive which means that the drive letter is not always the same.

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

Link to comment
Share on other sites

Stumpii,

My last suggestion was a little unclear. I think what I ment was auto-indention, not tabbing (lol). I have another suggestion, maybe an x button on the file tabs, like the firefox tabs, and maybe be able to move them around like in firefox. And maybe a context menu for when you right click the tabs o.O

I am looking again at the autocomplete operation (which includes auto-indentation).

The dockpanel suite is a separate control, so I will look at if those features can be added.

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

Link to comment
Share on other sites

Request for New Feature

In addition to the production and beta include directories would it be possible to add the option to specify a user include directory.

I have a number of specialized UDF and tweaked standard UDF which I keep in a separate directory to avoid problems when updating AutoIt. To use the debugger I currently have to use the full path in the include statement which is a bit inconvenient as I run AutoIt and the debugger as portable apps on a USD hard drive which means that the drive letter is not always the same.

Thanks

Bowmore

Problem is that I do not think that there is a way for AutoIt to use the folder. It could be built in to the debug file, but would still give an error when running the script directly.

What I do is have a program in my 'custom include' folder. When I run it, it moves all the au3 files to the AutoIt include folder. I can then refer to my includes the same as the built in scripts. When I reinstall AutoIt, I get error when compiling which tells me to run the program again. I find this the easiest way to do it.

I guess in the debugger, I could have an additional include folder path and a button to copy the scripts to the AutoIt include folder.

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.

Link to comment
Share on other sites

  • 2 weeks later...

Bug in Parser

Stumpii,

at first let me express my thanx for your debugger. Having tried it for just about a single hour and it at least has the potential to become one of my best tools. Thanx a lot!

I just ran into a problem/bug. I probably can work around this, but it seems to be a bug anyway, so I'll inform you:

In a rather complex project (at least for me) I have added quite a lot of debugging code a la

$mDbg=1
if $mDbg Then ConsoleWrite("$SDrs: "&_ArrayToString($SDrs, ", ",1)&@CRLF)
...
If $mDbg then ConsoleWrite("$SearchFiles ["&$SDrs[0]&"]->")

This has worked fine with your debugger except the last of the above lines. Your debugger has created the following code fragment from that:

AutoIt_Debugger_NextLine("C:\Dokumente und Einstellungen\frenz\Eigene Dateien\AutoIT3\Compressiontesttool.au3", "Compressiontesttool.au3", 74, False, @error, @extended)
If $mDbg then ConsoleWrite("$SearchFiles ["&$SDrs[0]&"]->")
AutoIt_Debugger_FinishedLine("C:\Dokumente und Einstellungen\frenz\Eigene Dateien\AutoIT3\Compressiontesttool.au3", "Compressiontesttool.au3", 74, False, @error, @extended)
AutoIt_Debugger_SendVariable("$mDbg", $mDbg, @error, @extended)
AutoIt_Debugger_SendVariable("$SearchFiles", $SearchFiles, @error, @extended)
AutoIt_Debugger_SendVariable("$SDrs", $SDrs, @error, @extended)
If $mDbg then AutoIt_Debugger_SendConsoleWrite("$SearchFiles ["&$SDrs[0]&"]->", @error, @extended)

This is obviously wrong, as $SearchFiles was never been used as a variable, but as a name that implements the named object is a variable. I get an AutoIt error message box stating

Line 198: (File "C:\Dokumente und Einstellungen\frenz\Eigene Dateien\AutoIT3\Debug\Compressiontesttool.Debug Script.au3"):

AutoIt_Debugger_SendVariable("$SearchFiles", $SearchFiles, @error, @extended)
AutoIt_Debugger_SendVariable("$SearchFiles", ^ ERROR

Error: Variable used without being declared.

I'll rename those name strings for now.

Again thx for your work.

Greetings from Germany!

--

Uwe

Link to comment
Share on other sites

This is a great utility. Nicely done.

There appears to be incorrect use of the IsDeclared function.

From help file

IsDeclared ( expression )

Return Value

Success: Returns 1 for Global variable or variable declared outside functions.

Special: -1 for Local variable.

Failure: Return 0 when no variable can be found.

Example

If Not IsDeclared ("a") then .....

$a = 1

If IsDeclared ("a") then ......

("$" not used - correct usage.)

From piccaso Post#32

;Check if the variable os actually a variable

If IsDeclared($VariableName) <> 1 Then

("$" still in variable name )

; Piccaso was here

ElseIf Not IsDeclared(StringTrimRight($VariableName, 1)) Then

$oDebugWrapper.SendVariable ($VariableName, "<Undeclared>")

("$" still in variable name. Should be StringTrimLeft($VariableName, 1). )

From AutoIt Version: 3.2.1.11 (beta)

Author: myName

;Check if the variable is actually a variable

If Not IsDeclared($StrippedVariableName) Then

(The "$" is not stripped from the variable name.)

ElseIf Not IsDeclared($VariableValue) Then

Return "<Undeclared>"

(Using contents of the variable to check if the variable is declared does not work)

This is the experimenting script for the IsTYPE functions, with special focus on IsDeclared. This script also returns more than one description of a variable.

;
$var = True
ConsoleWrite($var & " contains " & Execute($var) & VariableType($var) & @LF)

Local $a = 1.2
$var = "$a"
ConsoleWrite($var & " contains " & Execute($var) & VariableType($var) & @LF)

;local $a = 3
$var = "3"
ConsoleWrite($var & " contains " & Execute($var) & VariableType($var) & @LF)

$var = Default
ConsoleWrite($var & " contains " & Execute($var) & VariableType($var) & @LF)

Local $a = "MsgBox"
$var = "$a"
ConsoleWrite($var & " contains " & Execute($var) & VariableType($var) & @LF)

Local $a[2]
$var = "$a"
ConsoleWrite($var & " contains " & Execute($var) & VariableType($var) & @LF)

Local $a = Binary("ABC")
$var = "$a"
ConsoleWrite($var & " contains " & Execute($var) & VariableType($var) & @LF)

Local $a = WinGetHandle("")
$var = "$a"
ConsoleWrite($var & " contains " & Execute($var) & VariableType($var) & @LF)

$var = "$b"
ConsoleWrite($var & " contains " & Execute($var) & VariableType($var) & @LF)

$var = "$sRes"
ConsoleWrite($var & " contains " & Execute($var) & VariableType($var) & @LF)

;=============================================
Local $var = "qwe"
; Returns 1 -Global variable or variable declared outside functions
ConsoleWrite($var & ' IsDeclared("$Var") ' & IsDeclared("Var") & @LF)

; Note: These do not work
ConsoleWrite($var & ' IsDeclared("$Var") ' & IsDeclared("$Var") & @LF)
ConsoleWrite($var & ' IsDeclared($Var) ' & IsDeclared($var) & @LF)
;=============================================

;==== AutoIt_Debugger_ReturnVariableValue ====
Func VariableType($VariableName)
    Local $sRes = " TYPE: ", $VariableValue = Execute($VariableName)
    If IsBool($VariableValue) Then $sRes &= "Boolean "
    If IsFloat($VariableValue) Then $sRes &= "Float "
    If IsInt($VariableValue) Then $sRes &= "Int "
    If IsNumber($VariableValue) Then $sRes &= "Number "
    If IsString($VariableValue) Then $sRes &= "String "
    If IsArray($VariableValue) Then $sRes &= "Array "
    If IsObj($VariableValue) Then $sRes &= "Object "
    If IsBinary($VariableValue) Then $sRes &= "Binary "
    If IsHWnd($VariableValue) Then $sRes &= "HWnd "
    If IsKeyword($VariableValue) Then $sRes &= "Keyword "
    If IsDllStruct($VariableValue) Then $sRes &= "DllStructure "
    If StringLeft($VariableName, 1) <> "$" Then $VariableName = "$" & $VariableName
    If Not IsDeclared(StringTrimLeft($VariableName, 1)) Then $sRes &= "Undeclared "
    If IsDeclared(StringTrimLeft($VariableName, 1)) = 1 Then $sRes &= "Global "
    If IsDeclared(StringTrimLeft($VariableName, 1)) = -1 Then $sRes &= "Local "
    Return $sRes
EndFunc   ;==>VariableType
;

From help file Remarks

"If there is a need to use IsDeclared() to check that a variable exists, then in most situations Assign() should be used to create/write to the variable and Eval() should be used to read from the variable."

I wonder if IsDeclared should be used at all?

I hope this helps with your great script.

Link to comment
Share on other sites

  • 1 month later...

Hi folks,

I'm new to this stuff and forum.

I installed Graphical AutoIt Debugger but had no chance to get it to work.

I tried the installation into the recomended and also different paths.

The debugger did not run from the installed folder.

If I start it from the unpacked download folder it starts but as example it was not able to find autoit3.exe when I hit the "run" button.

Changing paths in the options was possible but just one time and it did not save them.

Are there problems with Windows Vista or what mayed I done wrong.

Any idea mayed be great.

many thanks in advance

Rosi

Link to comment
Share on other sites

You need to install AutoIt and ensure the path to it is set in the Options. Press the big button on the top right then go to AutoIt Debugger Options.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

You need to install AutoIt and ensure the path to it is set in the Options. Press the big button on the top right then go to AutoIt Debugger Options.

@bo8ster

I tried it several times.

yes I have autoit3 installed in the default path and also user defined. (thought there may be a problem with the blank in "program files").

Graphical AutoIt Debugger does not even show if I click it in it's installation path.

(some error with null exception wich I couldn't copy'n paste)

If I click Graphical AutoIt Debugger in the unpacked folder at least it loads.

One time I could open a .au3 file but as soon as I click the run button or make changes to it( or the new one that it loads automatically) Debugger crashes to error. (application does not work window)

Yes I clicked on Option to check the paths. there are paths in red colored lines( something with USB stick by default)

I tried to change with no success. That mayed be because it's the unpacked one (installed quits before).

many thanks in advance

Rosi

Link to comment
Share on other sites

Not sure about that. Sounds like something funny is going on there - have you experienced any other issues with your computer?

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...