Jump to content

Using AutoIt3Wrapper_Run_Debug_Mode


Bowmore
 Share

Recommended Posts

I use the AutoIt3Wrapper directive #AutoIt3Wrapper_Run_Debug_Mode=Y to trace the line by line flow of execution through my script. With some scripts this can result in a lot output to look at. I would like to be able to exclued some sections of my script, such as the message loop or other tight loops, from producing debug output to the console window in Scite. Are there any additional directives for Debug_Mode similar to the #Obfuscator_Off #Obfuscator_On used by obsfuscator to turn obsfuscation off for sections of code.

Possibly something like

#Debug_Mode[b]_Off
  while ()
      Sleep(10)
  WEnd
#Debug_Mode_On
Edited by 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

  • Developers

Are there any additional directives for Debug_Mode similar to the #Obfuscator_Off #Obfuscator_On used by obsfuscator to turn obsfuscation off for sections of code.

I have used the debug script Klaatu has posted in the Examples and implemented that in Autot3Wrapper func RunAutoItDebug().

Klaatu has build in a TOGGLE for switching OFF/ON the debugging by adding this:

;debug

So following example will skip the first $test line in the debug console messages:

#AutoIt3Wrapper_run_debug_mode=y
For $x = 1 to 5
;debug
    $test = 1
;debug
    $test = 2
Next

Maybe I should make it for the next release a more "inline" #Autoit3Wrapper directive. :)

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

Jos,

Maybe I should make it for the next release a more "inline" #Autoit3Wrapper directive

That would be most useful if you could manage it. :)

Perhaps with an _On/_Off syntax to prevent confusion? ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I have used the debug script Klaatu has posted in the Examples and implemented that in Autot3Wrapper func RunAutoItDebug().

Klaatu has build in a TOGGLE for switching OFF/ON the debugging by adding this:

;debug

Thank you Jos.

I find the #AutoIt3Wrapper_run_debug_mode directive very useful for tracking down flaws in my flow of my code logic.

Thanks also to Klaatu for the original RunAutoItDebug().

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

  • Developers

I will post a new AutoIt3Wrapper Beta soon that will support the current and suggested directives. something like:

#AutoIt3Wrapper_run_debug_mode=y
For $x = 1 to 5
;debug
    $test = 1
;debug
    $test = 2
#AutoIt3Wrapper_run_debug=Off
    $test = 3
#AutoIt3Wrapper_run_debug=On
    $test = 4
Next
Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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