Jump to content

I need a debugger for AutoIt v3.3.15.3 Beta


Mbee
 Share

Recommended Posts

Hi!

I'm using Maps (and I love 'em!), so I have to use the latest AutoIt Beta. I've switched to Beta mode, and the graphical debugger doesn't even show up in the Explorer context menu (not surprising). So I'd like to use _Dbug (rather than a large number of MsgBox statements), but it fails when it encounters a Map function (such as MapExists). I've made a request for a version that will work with the Beta, but going on past history, I don't expect an answer anytime soon.

I'm not necessarily asking for someone else to modify _Dbug, because I can probably do it myself, as long as I know how to adapt it to use the Beta. Can someone please enlighten me as to how to adapt a UDF or other function to use AutoIt Beta?

Thanks!

Link to comment
Share on other sites

  • 4 months later...

Hello,

I'm relatively new to AutoIt3 and have an app where I'm using Map, therefore I run it in Beta. I need to debug my script. When I use the graphical debugger Version 0.47.0.0 (which is working perfectly with other scripts of mine), the Beta option is grayed-out despite "Check for Updates" showing I have Beta version 3.3.15.3 installed along with production version 3.3.14.5.

Failing that, for the first time I tried _Debug. When I do a Beta Run, the SendMessage.au3 file opens up in the SciTE editor with a "missing EndIf" message on line 20. What the heck is going on? Is SendMessage.au3 used by Debug.au3 and why am I getting an error message in something that is not my script?

If someone has a suggestion for either of these issues, I would really appreciate it.

Link to comment
Share on other sites

1 hour ago, MP1454 said:

What the heck is going on?

hmm, welcome to the forum ?.

1 hour ago, MP1454 said:

If someone has a suggestion for either of these issues, I would really appreciate it.

Share a sample script that produces the error.

@Heron "Last visited: November 27, 2011".
I run the sample provided and it just works in beta with maps.
So, yes, share a sample script that produces the error.

Note: I never used a debugger, but I'll help.

Link to comment
Share on other sites

;~  $AutoItDir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","InstallDir") ; bad idea
    $AutoItDir = StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)-1) ;        better idea
    $run = StringFormat('%s\\AutoIt3.exe DbugScript.au3 "%s" "%s" "%s" "%s"', $AutoItDir, @ScriptName, @ScriptDir, $DBGnotifyFun, $DBGcommandFun)

Do that above and post if that solved the issues. 

 

#include <dbug.au3>
;~ #include <OnDebugMsgBox.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
    ; Declare a map and assign with various keys value pairs.
    Local $mMap[]
    $mMap[1] = "Integer One" ; Integer value as a key.
    $mMap["2"] = "String Two" ; String value representing an integer as a key. This is a string not an integer.
    MapAppend($mMap, "Integer Two") ; Append a value using the next available integer, which is 2 in this case.

    ; Retrieve the keys contained in the map. A zero-based one-dimensional array is returned.
    Local $aMapKeys = MapKeys($mMap)
    For $i = 0 To UBound($aMapKeys) - 1
        MsgBox($MB_SYSTEMMODAL, "", "Key: " & $aMapKeys[$i] & @CRLF & _ ; The key.
                "Value: " & $mMap[$aMapKeys[$i]] & @CRLF & _ ; Use the array value of MapKeys() to display the value of the key.
                "Variable Type: " & VarGetType($aMapKeys[$i]) & @CRLF) ; Display the variable type of the key i.e. integer or string.
    Next
    While 1
        Sleep(200)
    WEnd
EndFunc   ;==>Example

I've tested with the above without a problem.

Edited by argumentum
Link to comment
Share on other sites

Sorry, been under a crunch to get the application working and haven't had a chance to follow up on this. I added some FileWrite lines and figured out what was going on with my script, so I didn't need to get the debugger working for AutoIT3 Beta. Next time I will take the time to strip down the code to submit, but I'm guessing the stripped down version won't have the problem.

Thanks for the response.

Link to comment
Share on other sites

Thank you argumentum for you reply. When I run your script the DBUG window opens up, but I have no idea what to do next. I need to do a lot of reading on this debugger to learn how to use it.

Thanks for getting me started with it though. In the meantime, I need to sort out different issues with the GUI functions.

Link to comment
Share on other sites

On 4/14/2021 at 5:43 PM, MP1454 said:

Thank you argumentum for you reply. When I run your script the DBUG window opens up, but I have no idea what to do next. I need to do a lot of reading on this debugger to learn how to use it.

Thanks for getting me started with it though. In the meantime, I need to sort out different issues with the GUI functions.

For the record, I've had great success with the graphical debugger in Beta mode, and in my case the Beta icon at the top is highlighted. I assume you've tried ensuring you've run the Beta-included script to switch to Beta mode and then just clicking the Beta icon?

Of course, the graphical debugger and Event Mode don't play so well together if you're not careful to avoid trying to debug event functions. As for Dbug, that works better if you're using Event Mode, but I haven't tried it with the Beta, but it appears that argumentum has done so successfully, My advice is that if you're not using Event Mode, you should try to figure out why the graphical debugger won't enter Beta mode, since the GD is far easier to use.

Link to comment
Share on other sites

  • 1 month later...

Hi Mbee

I see you have posted many things around Dbug in the past

I'm late, but I hope ut could be useful

I use _Dbug.au3 from valdemar1977 :

Old, but nice !

Just use that code fragment :

; Debug
#include "..\..\Dbug\_Dbug.au3"
; À commenter si usage de _Dbug.au3...
;#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

../.. is my own path config...

Use F5 for debug and comment it to build a usable .EXE¬†¬† ūüėȬ†¬†

Regards

Edited by LaurentC
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

×
×
  • Create New...