Jump to content

Recommended Posts

Posted
  On 3/9/2016 at 8:41 AM, ISI360 said:

Just for the records: This Debugger is already included in the ISN AutoIt Studio. (Tools -> Debugging -> Advanced Debugging with DBUG)

Expand  

 

  On 3/9/2016 at 8:59 AM, valdemar1977 said:

Hi, @ISI360.

In fact not this one, but original version of DBUG by @Heron, with small modifications by @pandel.

https://www.autoitscript.com/forum/topic/103142-another-debugger-for-autoit/?page=2#comment-1090579

Expand  

 

Thanks for all the hard work!

Try to forgive me for my stupidity, but I'm afraid I'm not clear on how to use either _debug.au3 posted above -OR- the DBUG embedded with ISN AutoIt Studio.  When I try to use the former by adding "#include <_dbug.au3>" and run my script, that _dbug shows a control window, but no actual code is shown and I have no idea how to set breakpoints or otherwise monitor my script's code.  On the other hand, when I try to use the latest ISN AutoIt Studio, I can see my code and I can set breakpoints, but whenever I try to actually start the script I always get the error message: "Debug script could not be created!"

Would someone be so kind as to help me figure these things out?

Another question is: Can I upgrade the debugger embedded in ISN AutoIt Studio to use the latest version posted above, or are the two incompatible?  If it is possible to upgrade ISN AutoIt Studio to use the latest version, what's the best way of doing that?

 

Thanks!

  • 3 weeks later...
Posted (edited)
  On 10/17/2016 at 8:33 PM, Mbee said:

 

 

Thanks for all the hard work!

Try to forgive me for my stupidity, but I'm afraid I'm not clear on how to use either _debug.au3 posted above -OR- the DBUG embedded with ISN AutoIt Studio.  When I try to use the former by adding "#include <_dbug.au3>" and run my script, that _dbug shows a control window, but no actual code is shown and I have no idea how to set breakpoints or otherwise monitor my script's code.  On the other hand, when I try to use the latest ISN AutoIt Studio, I can see my code and I can set breakpoints, but whenever I try to actually start the script I always get the error message: "Debug script could not be created!"

Would someone be so kind as to help me figure these things out?

Another question is: Can I upgrade the debugger embedded in ISN AutoIt Studio to use the latest version posted above, or are the two incompatible?  If it is possible to upgrade ISN AutoIt Studio to use the latest version, what's the best way of doing that?

 

Thanks!

Expand  

Hi @Mbee.

Sorry for delay in answer. Original DBUG was designed to using with Scite4Autoit3 or other code editors based on Scite. Please try to start your script in standard Autoit3 editor with including #include <_dbug.au3>. When the main DBUG window is appear in Scite4Autoit3 window with your source code try to put break point and then press start in DBUG GUI.

About upgrade ISN AutoIt Studio debugger with latest DBUG, please address this question to @ISI360 who is a developer of ISN Autoit Studio. Source code of DBUG is available. 

Edited by valdemar1977
  • 3 weeks later...
  • 2 months later...
Posted (edited)

Hi, all. Does anybody help me? I tried to debug a code in a separate file (test2.au3 in my example), but when I pressed F7 the whole code is made without break.  No matter whether I put #include "_dbug.au3" in test2.au3 or not. I use SCITE 3.3.7 and autoit3 v. 3.3.8.1.  _Dbug version is 2016.06.24.

What I do wrong? I tried to find a solution in forum but without a success. Test1 is a main file.

Best regards.

test2.au3Fetching info...

test1.au3Fetching info...

Edited by zbigj
  • Developers
Posted (edited)
  On 2/20/2017 at 1:40 PM, zbigj said:

I tried to debug a code in a separate file (test2.au3 in my example), but when I pressed F7 the whole code is made without break.

Expand  

Not sure what this means and what you are asking, but F7 ONLY compiles all sources into a target script.exe.
What exactly are you trying to accomplish?

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

Posted (edited)
  On 2/20/2017 at 4:53 PM, Jos said:

Not sure what this means and what you are asking, but F7 ONLY compiles all sources into a target script.exe.
What exactly are you trying to accomplish?

Jos

Expand  

Thanks for a quick reply. I tried to debug my au3 file. I mean, that when I'm in Scite with test1.au3 opened and active window and press F5 (not F7 now) I go to dbug - window of dbug opens and everything works fine. Now I pressed F7 and I cannot  go into test2.au3 file, which is in the same directory as test1 and this is also a directory when _dbug.au3 exists, I cannot debug the test2 function :( I inserted there break (blue dot - Ctrl-F2) but neither this not F7 doesn't want to stop in included file.

Edited by zbigj
  • Developers
Posted

Why do you expect running test2.au3 would do anything?

#include "_dbug.au3"
Func test2()
   MsgBox(0,'Hi there!','Great debugger !')
EndFunc

It doesn't do anything so will end immediately.

Test1.au3 however does include test2.au3 and then starts Func test2(), so will show something.

#include "_dbug.au3"
#include <test2.au3>

test2()

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

Posted
  On 2/20/2017 at 8:30 PM, zbigj said:

Thanks for a quick reply. I tried to debug my au3 file. I mean, that when I'm in Scite with test1.au3 opened and active window and press F5 (not F7 now) I go to dbug - window of dbug opens and everything works fine. Now I pressed F7 and I cannot  go into test2.au3 file, which is in the same directory as test1 and this is also a directory when _dbug.au3 exists, I cannot debug the test2 function :( I inserted there break (blue dot - Ctrl-F2) but neither this not F7 doesn't want to stop in included file.

Expand  

Hi @zbigj

_dbug cannot debug in include files try to use

#include "_dbug.au3"


test2()

Func test2()
   MsgBox(0,'Hi there!','Great debugger !')
   sleep 1      ; Put breakpoint here
EndFunc

 

Posted
  On 2/21/2017 at 2:24 PM, valdemar1977 said:

Hi @zbigj

_dbug cannot debug in include files try to use

#include "_dbug.au3"


test2()

Func test2()
   MsgBox(0,'Hi there!','Great debugger !')
   sleep 1      ; Put breakpoint here
EndFunc

 

Expand  

And this is the answer... I made software in AutoIt3 which is several thousand lines long, divided into many include files.  It's impossible to have all in one single file, I made a library which I uses in many programs - there is no sense to repeat the same code, just for debugging :(

 

Thanks for explaination.

Posted
  On 2/20/2017 at 8:37 PM, Jos said:

Why do you expect running test2.au3 would do anything?

#include "_dbug.au3"
Func test2()
   MsgBox(0,'Hi there!','Great debugger !')
EndFunc

It doesn't do anything so will end immediately.

Test1.au3 however does include test2.au3 and then starts Func test2(), so will show something.

#include "_dbug.au3"
#include <test2.au3>

test2()

Jos

Expand  

The main file is test1.au3. I tried to make an example as simple as possible and ask it there is a possibility to debug code in include files - that's why I made test1 and test2.au3. Valdemar1970 asked that there is no chance to debug in test2 (include file) and all my hope disappeared :(

Thanks for reading and try to solve my problem. 

Posted (edited)
  On 2/21/2017 at 2:41 PM, zbigj said:

And this is the answer... I made software in AutoIt3 which is several thousand lines long, divided into many include files.  It's impossible to have all in one single file, I made a library which I uses in many programs - there is no sense to repeat the same code, just for debugging :(

 

Thanks for explaination.

Expand  

Don't panic :) . In future version I'm planing to add a keyword for _dbug that will stop execution after that keyword.

Edited by valdemar1977
Posted
  On 2/21/2017 at 6:19 PM, valdemar1977 said:

Don't panic :) . In future version I'm planing to add a keyword for _dbug that will stop execution after that keyword.

Expand  

In include files? You 'll save my life :)) Would very, very appreciate this :)

 

Posted (edited)
  On 2/22/2017 at 5:15 PM, zbigj said:

In include files? You 'll save my life :)) Would very, very appreciate this :)

 

Expand  

At the moment for debug purposes you can use Au3stripper for merge all recources (includes) to one main script file.

Command is C:\Program Files (x86)\AutoIt3\SciTE\au3Stripper\AU3Stripper.exe <main_au3_file> /mo

/mo - meant Merge Only (other stripper parameters you can find in docs).

After stripping you can found a stripped file in the same dir as the source.

Open it in editor and add #include "_dbug.au3" at the include section of stripped file, then start it with F5 to debug.

Edited by valdemar1977
Posted
  On 2/22/2017 at 8:05 PM, valdemar1977 said:

At the moment for debug purposes you can use Au3stripper for merge all recources (includes) to one main script file.

Command is C:\Program Files (x86)\AutoIt3\SciTE\au3Stripper\AU3Stripper.exe <main_au3_file> /mo

/mo - meant Merge Only (other stripper parameters you can find in docs).

After stripping you can found a stripped file in the same dir as the source.

Open it in editor and add #include "_dbug.au3" at the include section of stripped file, then start it with F5 to debug.

Expand  

Yes, I try to do in this way, some minor problems :)) Thank you for suggestion.

Regards

Posted
  On 2/25/2017 at 5:24 PM, zbigj said:

Yes, I try to do in this way, some minor problems :)) Thank you for suggestion.

Regards

Expand  

Hi, @zbigj.

Workaround for debugging include files is:

  1. Open your Main au3 file and found #include section
  2. Split includes on two parts - your own includes files and standard Autoit UDFs (and/or UDFs that you don't want to debug)
  3. Comment all includes that you do not need to debug and save file.
  4. Run au3stripper with /mo parameter  "C:\Program Files (x86)\AutoIt3\SciTE\au3Stripper\AU3Stripper.exe" <main_au3_file> /mo
  5. Open stripped au3 file and put all commented includes at the includes section of it, uncomment it and add #include "_dbug.au3"
  6. Start your script on debug with F5 as usually.
  • 2 weeks later...
Posted
  On 2/27/2017 at 10:07 AM, valdemar1977 said:

Hi, @zbigj.

Workaround for debugging include files is:

  1. Open your Main au3 file and found #include section
  2. Split includes on two parts - your own includes files and standard Autoit UDFs (and/or UDFs that you don't want to debug)
  3. Comment all includes that you do not need to debug and save file.
  4. Run au3stripper with /mo parameter  "C:\Program Files (x86)\AutoIt3\SciTE\au3Stripper\AU3Stripper.exe" <main_au3_file> /mo
  5. Open stripped au3 file and put all commented includes at the includes section of it, uncomment it and add #include "_dbug.au3"
  6. Start your script on debug with F5 as usually.
Expand  

Thank you, it explain me a lot and save a time. Simple, and there is no need to discover it myself.

  • 1 year later...
  • 4 months later...
Posted (edited)

Had to do 1 modification to _Dbug.au3, namely adding var $DBG_tabSet to a Global statement.
 

  Quote

"C:\Program Files (x86)\AutoIt3\Include\_Dbug.au3"(244,47) : warning: $DBG_tabSet possibly not declared/created yet

Expand  

It does not occur in the supplied examples because the #Include "_Dbug.au3" is before the Opt('MustDeclareVars', 1).

Excellent tool. Thank you very much.

Btw; I'm running v3.3.14.5

Edited by GordonShumway
  • 4 weeks later...
Posted

there is  12 warning(s) reported by Au3Check

Try this following settings to see what I mean

; AU3Check settings
#AutoIt3Wrapper_Run_AU3Check=Y
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • 3 weeks later...

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
  • Recently Browsing   0 members

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