maziac / DeZog

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

Debugging with source files is impossible when there are ORGs with non-increasing addresses #8

Closed ruguevara closed 4 years ago

ruguevara commented 4 years ago

Describe the bug If z80 code has several ORGs with non-increasing addresses (i.e. low memory, then high memory, then low memory back, see https://github.com/ruguevara/z80-sample-program/blob/master/main.asm#L31), DeZog can not debug such project within the .asm source files, only disasm.asm appears instead.

To Reproduce Steps to reproduce the behavior:

  1. Checkout modified z80-sample-program repository 'https://github.com/ruguevara/z80-sample-program/'
  2. Build as usual.
  3. Start debugging.
  4. See disasm.asm opened instead of main.asm

Expected behavior Opened main.asm with current instruction being executed at line 50: https://github.com/ruguevara/z80-sample-program/blob/master/main.asm#L50

Version etc. :

Additional context Please attach your launch.json file: see 'https://github.com/ruguevara/z80-sample-program/blob/master/.vscode/launch.json'

maziac commented 4 years ago

Thanks for pointing that out. This was probably some old code lying around which I removed now. I put a new release here: https://github.com/maziac/DeZog/releases/tag/0.12.0 please try and let me know if it works for you.

ruguevara commented 4 years ago

I've installed version 0.12.0, added "remoteType": "zrcp",, but when I press "Start Debugging", nothing happens in the emulator and debugging does not starting. And in the "Log (Window)" this line appeared.

[2020-02-18 11:38:21.957] [renderer1] [error] timeout after 500 ms: Error: timeout after 500 ms
    at t.RawDebugSession.handleErrorResponse (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2798:1003)
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2798:434
    at async t.RawDebugSession.shutdown (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2796:536)
ruguevara commented 4 years ago

But when I downloaded your version 0.11.0 sources, applied your patch for this bug fix, npm install-ed it and fed to VSCode, it worked! Thanks a lot!

maziac commented 4 years ago

Ok, so the fix at least is working. So I will close this bug.