Jump to content

Recommended Posts

  • 4 months later...
Posted (edited)

The last Dbug GUI version doesn't show images and no white button is shown in the Scite left column near the next statement to execute. Maybe it's due to some config. error on my side. BTW, I thought you should know.

in attachment there are screenshots showing different appearance of valdemar1977 and asdf8 versions.

 

Best regards and many thanks for sharing your version.

Peppe

 

screen_20160217_135507.png

Edited by gcriaco
Posted

gcriaco, help me please:

Check the whether you have, after you run debug file

@TempDir & "\dbug.icl"

or

@AppDataDir & "\AutoIt v3\dbug.icl"

if the file exists, it should have checksums:
CRC32: BAF55878
MD5: F14138A10688CD0E10E7EA77D4EBFB78

#Include <Crypt.au3>

If FileExists(@TempDir & "\dbug.icl") Then
    ConsoleWrite('+ Found file :' & @TempDir & "\dbug.icl" & @CRLF)
    $bHash = _Crypt_HashFile(@TempDir & "\dbug.icl", $CALG_MD5)
    If $bHash = '0xF14138A10688CD0E10E7EA77D4EBFB78' Then
        ConsoleWrite('+ Hash Ok' & @CRLF)
    Else
        ConsoleWrite('+ Hash Bad' & @CRLF)
    EndIf
ElseIf FileExists(@AppDataDir & "\AutoIt v3\dbug.icl") Then
    ConsoleWrite('+ Found file :' & @AppDataDir & "\AutoIt v3\dbug.icl" & @CRLF)
    $bHash = _Crypt_HashFile(@AppDataDir & "\AutoIt v3\dbug.icl", $CALG_MD5)
    If $bHash = '0xF14138A10688CD0E10E7EA77D4EBFB78' Then
        ConsoleWrite('+ Hash Ok' & @CRLF)
    Else
        ConsoleWrite('+ Hash Bad' & @CRLF)
    EndIf
Else
    ConsoleWrite('! Not found file "dbug.icl"' & @CRLF)
EndIf

ps: because I do not at all satisfied with functional debugger, will soon be another update.

Posted

Please use ZIP instead RAR when you attach new version.

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

Posted

Now icons are shown but the white button in the Scite left column near the next statement to execute doesn't appear.

Thanks again for support.

Peppescreen_20160219_083337.thumb.png.ade0b27

 

  • 2 weeks later...
Posted (edited)
  On 2/18/2016 at 5:27 PM, asdf8 said:

Update debugger:

  • Changed interface.
  • Fixed detected the errors.
  • Others improvements and additions.

screenshot.png.41566ca3e50641b1a51412117

 

Dbug_2016.02.18.zip

Expand  

Great work @asdf8!!! Really great...

If you allow, made some suggestions.

1) At the moment _DBUG has an error on #cs ... #ce section of script

My fault, of course we need to put #include <_Dbug.au3> in the first line of the script.

2) Is it possible to implement real OEM console for natural debugging console scripts? (In my version I'm using DbugConsole.exe). StdOut in SciTE console has some problems with encoding and some other features (DBUG_Example.au3).

3) Very low on huge arrays. Not possible to select array columns range. As you know WinAPI can show only 256 columns. But If need to see values of my array after that range?

Problems with window size of Array Viewer.2016-03-03_15-29-20.png.71671e79b76d11cb

In expression list strange value of $i var on script start. ( array.au3)

Need to be a clear.

2016-03-03_15-44-31.png.72f8fb7b456ab6a4

I mean problem is here

For $i = $DBGbtnStep To $DBGbtnStoreList
    GUICtrlSetResizing($i, $GUI_DOCKSIZE + $GUI_DOCKTOP + $GUI_DOCKLEFT)
Next

You can change $i on $_DBUG_i for example,

May be in future change all vars on $_DBUG_varname for excluding any future interfere with script vars?

Edited by valdemar1977
Posted (edited)

valdemar1977's Dbug apparently had an unresolved issue with @error macro but F7 and F8 worked correctly and all variables are displayed by default in the watch window which is somewhat interactive. Because of the @error issue I tried asdf8's version.

asdsf8's _Dbug doesn't display any variables in the watch window and when I press F8 when running the included test.au3, instead of single stepping across the first statement it goes straight to line 19 saying "Break in _test(19). F7 works fine but F8 does not single step for me. It behaves as though I had issued a "run to breakpoint" command, except  there are no breakpoints set.

I am unclear as to the purpose of "load and save commands". Can anyone explain how these commands are edited and where are they stored?

Neither of these debuggers now appear to work much like the youtube video referenced in the opening post in this thread so I'm wondering if they don't belong somewhere else?

I am using ver 3.3.14.2 with Dbug2016.02.18.zip. The MD5 for my dbug.icl is AB02F80DBEB12C2A4F24AA9DBA4C3103 which differs from the value mentioned post #86. Does this still matter?

Edited by pseakins
Added version and MD5 details

Phil Seakins

Posted

Looking again at  Dbug2016.02.18 with some other scripts I see that F8, instead of single stepping the current statement, actually causes the code to run full speed until a line with a function call is reached. It then stops on the first executable statement in the function. Hitting F8 once more takes you back to the line following the line that made the function call. I've never seen an IDE behave this way - is this the actual intention? Valdemar1977's version doesn't do this. Can this be fixed?

Also, I have found the debugger fails on source statements that are split over multiple lines with the "_" continuation marker. Is this fixable other than by marking those statements as "do not debug"?

Regardless, it is great to have a debugger like this in AutoIT.

Phil Seakins

Posted
  On 3/2/2016 at 2:03 PM, valdemar1977 said:

At the moment _DBUG has an error on #cs ... #ce section of script

Expand  

How can I reproduce this error?

  On 3/2/2016 at 2:03 PM, valdemar1977 said:

Is it possible to implement real OEM console for natural debugging console scripts? (In my version I'm using DbugConsole.exe). StdOut in SciTE console has some problems with encoding and some other features (try attached script as an example).

Expand  

This is a special case of another problem. There also includes debugging scripts using PE-resources from the compiled applications, debugging script running as a service, debug interprocess communication scripts, etc. All this can be solved by debugging compiled script. The next version will have the opportunity to add to the source code debugger, which can then compile and debug in real conditions of use.

  On 3/3/2016 at 1:17 AM, pseakins said:

_Dbug doesn't display any variables in the watch window

Expand  

Browse the list is disabled by default, this speeds up the work of the debugger, if the script is paused variables can be viewed directly in the editor by placing the mouse over them, if you move the cursor to an empty list of variables appears tooltip - To automatically update expressions list, toggle button "Clear expressions list".

  On 3/3/2016 at 1:17 AM, pseakins said:

when I press F8 when running the included test.au3, instead of single stepping across the first statement it goes straight to line 19 saying "Break in _test(19

Expand  

F8 - "Step Over Scope", first scope was a "Global", reaching 19 line steel in scope function "_test", the scope has changed - debugger stood pause.

  On 3/3/2016 at 1:17 AM, pseakins said:

I am unclear as to the purpose of "load and save commands". Can anyone explain how these commands are edited and where are they stored?

Expand  

Edit commands and expressions in the same place where they are displayed, saved in the ini-file, next to the script being debugged.

  On 3/3/2016 at 1:17 AM, pseakins said:

I am using ver 3.3.14.2 with Dbug2016.02.18.zip. The MD5 for my dbug.icl is AB02F80DBEB12C2A4F24AA9DBA4C3103 which differs from the value mentioned post #86. Does this still matter?

Expand  

It concerned the debugger debugging and should not have any value to users.

  On 3/3/2016 at 9:36 AM, pseakins said:

Also, I have found the debugger fails on source statements that are split over multiple lines with the "_" continuation marker. Is this fixable other than by marking those statements as "do not debug"?

Expand  

This multi-line construction, during the execution of AutoIt transforms it into a single line, so the breakpoint is only possible on the first line of this design.

Posted
  On 3/3/2016 at 1:17 AM, pseakins said:

asdsf8's _Dbug doesn't display any variables in the watch window

Expand  

It is by design. After first start when dbug.ini still not created button "Clear expression list" in the switch On state.

Press it to show expressions, another click will clear all expressions and background of the list will be yellow. For restore default expressions list press "Restore original list" button (with ctrl will restore expressions for all scopes)

  On 3/3/2016 at 1:17 AM, pseakins said:

hen I press F8 when running the included test.au3, instead of single stepping across the first statement it goes straight to line 19 saying "Break in _test(19).

Expand  

It is by design also. Step over is mean steps to the next line, without descending into any functions called on the current line. F7 - working as line-by-line execution.

  On 3/3/2016 at 1:17 AM, pseakins said:

I am unclear as to the purpose of "load and save commands". Can anyone explain how these commands are edited and where are they stored?

Expand  

You can manually execute a some commands (for example change value of var or print to console). As an example try ConsoleWrite("It is a test"). You will see It is a test in StdOut console of SciTE. Also you can try to change value for variable in the expressions list, try to change arr $b value in test script ($b[0]="Is New Test"). Use Ctrl+Enter for execute. Display results window show error codes. You can save commands in dbug,ini file pressing "Save commands ..." also you will save a conditional breakpoints.

By the way @asdf8 why by default you put @Error in conditional breakpoints and @Error @Extended in commands? May be they need to be clear on first start?

  On 3/3/2016 at 9:36 AM, pseakins said:

lso, I have found the debugger fails on source statements that are split over multiple lines with the "_" continuation marker

Expand  

In my case all working great. Can you please provide an example?

Posted
  On 3/3/2016 at 11:25 AM, valdemar1977 said:

In my case all working great. Can you please provide an example?

Expand  
#include "_Dbug.au3"
$a = 5
$b = 6
$d = 7
If $a = 5 Or _ ; some comment
        $a = 4 Or _ ; another comment
        ($b = 6 And $d = 7) Then
    $a = 5
Else
    $a = 6
EndIf

This example fails with;

"C:\My Documents\AutoIt\Dbug\DbugScript_4.au3" (22) : ==> "If" statements must have a "Then" keyword.:
If $a = 5 Or DBG_GetExtErr()
 

Phil Seakins

Posted
  On 3/3/2016 at 1:11 PM, pseakins said:
#include "_Dbug.au3"
$a = 5
$b = 6
$d = 7
If $a = 5 Or _ ; some comment
        $a = 4 Or _ ; another comment
        ($b = 6 And $d = 7) Then
    $a = 5
Else
    $a = 6
EndIf

This example fails with;

"C:\My Documents\AutoIt\Dbug\DbugScript_4.au3" (22) : ==> "If" statements must have a "Then" keyword.:
If $a = 5 Or DBG_GetExtErr()
 

Expand  

Try this one...

#include "_Dbug.au3"
$a = 5
$b = 6
$d = 7
If $a = 5 Or _
        $a = 4 Or _
        ($b = 6 And $d = 7) Then
    $a = 5
Else
    $a = 6
EndIf

 

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