Jump to content

cDebug.au3 1.15.4

   (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    .  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 .

These functions are documented in cDebug.pdf

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

 

Acknowledgements

Melba23, Kafu, ProgAndy, jchd


What's New in Version 1.15.4

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
1.15.4    Independent of GuiOnEvent mode; Added missing parameter to parameter dump; Meets full AuCheck requirements; Added accelerators for buttons; Including more than once works

 

 

cDebug no maps.au3

cDebug.au3


User Feedback

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

There are no reviews to display.

×
×
  • Create New...