maziac / DeZog

Visual Studio Code Debugger for Z80/ZX Spectrum.
MIT License
210 stars 34 forks source link

Stepping over/into inc/dec with indexed addressing continues execution #93

Closed taylorza closed 2 years ago

taylorza commented 2 years ago

Description When single stepping through the code, when an inc (ix+?) instruction is encountered as soon as you step over/into the instruction the debugger continues execution as is no longer in single-step mode.

To Reproduce Steps to reproduce the behavior: Single step through the following application in the debugger, see the comment on the dec (ix+0) instruction

        org  $8000

main:
        ld   a,4        ; Set A to green
        out  ($fe),a    ; Change the border
        ld ix, data
        ld (ix+2), 105
        dec (ix+0)      ; <--- Single stepping over this instruction will trigger the debugger to allow the code to run to completion
        inc (ix+1)      ; <--- I expected to stop on this line, waiting for the next debugger command
        inc (ix+2)
        jr   $         

data db      100
        db      101
        db      102

Expected behavior I expected to be able to step over these instructions in the same way I step over the other instructions

Version etc. (please complete the following information):

maziac commented 2 years ago

Thanks for reporting. I can reproduce this. Will soon fix it. Meanwhile, as a workaround, you can place a workaround just after the dec (ix+0)

taylorza commented 2 years ago

Great, glad it was not something strange with my environment. I wanted to test on my Linux or Mac to double-check, but I did not get around to it.

maziac commented 2 years ago

Fixed in 2.7.1.