Jump to content

cDebug.au3 1.15.3

   (0 reviews)

1 Screenshot

About This File

cDebug.au3 includes four main debugging UDFs: _GuiDebug(), _ConsDebug(), _ClipDebug() and _FormatValsForDebug(). They all dump the values of all AutoIt subtypes and expressions, in a structured manner, including nested arrays (up to 3 dimensions) and slices of them, and even DLL structs and maps. It is an alternative to a graphical debugger, offering GUI output.

The format for calling the UDFs has been designed to make coding a call as convenient and fast as possible, minimizing coding effort and the chances of errors: the $name argument is often the same as the variables arguments, enclosed in quote marks.

For DLL structures, if you specify a tag, cDebug checks for differences between it and what it detects. If you only specify a structure variable, it can report the structure it detects, with the values of elements.

It does much more than MsgBox(), ConsoleWrite() and _ArrayDisplay(), in a definitely user-friendly manner, and does its best to avoid hiding your code in SciTE.

#include cDebug no maps.au3 or cDebug.au3 at the top of your script. If you #include cDebug.au3 (the version with maps)  #include #AutoIt3Wrapper_Version=B before #include cDebug.au3

It is fully documented in cDebug.pdf   .  During debugging and development of new features, the current version is used to debug the upcoming version, so there is much testing, even so  bugs are always possible, particularly in new features, such as reporting elements of maps whose keys match a regular expression. Bug reports and suggestions are welcome.

These UDFs have been in regular use for some years.

Because when cDebug was developed, maps were a use at your own risk feature, there are two streams of cDebug:

  • cDebug.au3 reports maps, so to use it you must be running a version of AutoIt that supports maps, e.g. 3.3.15.0, and #include cDebug.au3
  • cDebug no maps.au3 does not report maps, so you can be running any recent version of AutoIt, e.g. 3.3.14.5, and #include cDebug no maps.au3

The only difference between the two streams is that map-reporting code is commented out in cDebug no maps.au3 .

A teaser

This script:

#AutoIt3Wrapper_Version=B       ; beta 3.3.15.0 or greater is mandatory for cDebug.au3
#include "cDebug.au3"
Local $seasons[]
$seasons.summer = 'May to September'
$seasons.spring = 'April'
$seasons.fall = 'October to November'
$seasons.winter = 'December to March'
Local $aCats[3][3] = [['jack','black',3],['suki','grey',4],[$seasons,'','']]
Local $i = 1
Local $tStruct = DllStructCreate('uint')
DllStructSetData($tStruct,1,2018)
_GuiDebug('At line '&@ScriptLineNumber,'$cats,jack is,$cats[..][$i],$i,hex,structure{uint}', _
$aCats,$aCats[0][2],$aCats,$i,Hex(-$i),$tstruct)

produces:

5aa1dd5416705_cDebugteaser.jpg.c348b9799e68a7906d6e692f94069f7f.jpg

 

Edit history

See documentation PDF

Acknowledgements

Melba23, Kafu, ProgAndy, jchd


What's New in Version 1.15.3

Released

1.15.0    Added 3-d arrays; improved element-limit reporting code; added cDebug no maps.au3
1.15.1    Fixed bug in sub-expression
1.15.2    Added  $g_cDebug_bAlwaysAskClearClipboard and ability to customize cDebug without changing cDebug.au3; _cDebug_Example() now runs again with maps
1.15.3    Reatored showing element name for user-specified tags; improved parsing of struct elements; changed flag from $g_cDebug_bTellStructComparisonIsReasonable to $g_cDebug_ShowStructComparisonAlways

 

 

  • Like 2
  • Thanks 2



User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

  • Similar Content

    • valdemar1977
      By valdemar1977
      Dbug is graphical debugger for AutoIt.
      Project started by @Heron in 2009 and now supported by @asdf8 and @valdemar1977.
      Features
      Debug the complete script or just parts of it Display run status (line number of currently executed function) GUI default always-on-top in the upper right corner for comfortable debugging WM_NOTIFY and WM_COMMAND hook to prevent interference with possible message handlers Display scope, type and value of variables, expressions, macro's and constants (global AND function local) Execute commands in an immediate window. Can be expressions, functions and assignments Detailed display of array, struct and object variables Dynamic display of variable value in the source code (under cursor) Array table viewer with ability to view the sub-arrays, the correct handling of macro @Error, @Extended and other changes OEM and ANSI console output Conditional breakpoints Saving settings and debugging state and much more... How to use
      Extract from downloaded archive _Dbug.au3 to your Autoit include dir Add #include <_Dbug.au3> in to your code and run code Before compile or buid comment or remove #include <_Dbug.au3> from your code
    • Docfxit
      By Docfxit
      I would like to know if there is a way to make the send cmd send characters when using
      Graphical AutoIt Debugger By Stumpii,
      If Not WinActive("Setup - UltraVNC","Setup is preparing to install") Then WinActivate("Setup - UltraVNC","Setup is preparing to install") WinWaitActive("Setup - UltraVNC","Setup is preparing to install") Send("{ALTDOWN}f{ALTUP}") ;Finish The debugger when using step mode will execute the Send cmd line but the window doesn't receive the input.
      Thanks,
      Docfxit
    • c.haslam
      By c.haslam
      cDebug.au3 includes four main debugging UDFs: _GuiDebug(), _ConsDebug(), _ClipDebug() and _FormatValsForDebug(). They all dump the values of all AutoIt subtypes and expressions, in a structured manner, including nested arrays and slices of them, and even DLL structs and maps. It is an alternative to a graphical debugger, offering GUI output.
      The format for calling the UDFs has been designed to make coding a call as convenient and fast as possible, minimizing coding effort and the chances of errors: the $name argument is often the same as the variables arguments, enclosed in quote marks.
      For DLL structures, if you specify a tag, cDebug checks for differences between it and what it detects. If you only specify a structure variable, it can report the structure it detects, with the values of elements.
      It does much more than MsgBox(), ConsoleWrite() and _ArrayDisplay(), in a definitely user-friendly manner, and does its best to avoid hiding your code in SciTE.
      It is fully documented.  During development of new features, the current version is used to debug the upcoming version, so there is much testing.
      These UDFs have been in regular use for some years. Suggestions and bug reports are most welcome.
      Get the latest version in Example Scripts
      #AutoIt3Wrapper_Version=B ; beta 3.3.15.0 or greater is mandatory for cDebug.au3, not for cDebug no maps.au3 #include "cDebug.au3" Local $seasons[] $seasons.summer = 'May to September' $seasons.spring = 'April' $seasons.fall = 'October to November' $seasons.winter = 'December to March' Local $aCats[3][3] = [['jack','black',3],['suki','grey',4],[$seasons,'','']] Local $i = 1 Local $tStruct = DllStructCreate('uint') DllStructSetData($tStruct,1,2018) _GuiDebug('At line '&@ScriptLineNumber,'$cats,jack is,$cats[..][$i],$i,hex,structure{uint}', _ $aCats,$aCats[0][2],$aCats,$i,Hex(-$i),$tstruct) reports

         
×