maziac / DeZog

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

Unable to connect to internal or zesarux emulator #123

Closed timlinux closed 5 months ago

timlinux commented 6 months ago

Firstly, thank you for this wonderful project! A ZX Spectrum was my first computer and I am really enjoying relearning assembler for it!

I have followed in detail the various instructions for setting up my DeZog work. Just a little overview of my setup:

Current status

I have tested with both your z80-sample-program project and with my scratch area with a minimal compilable programme in it (https://github.com/timlinux/z80).

I appreciate that I am not giving you much actual diagnostic information and that is really my question - how can I debug / view logs etc. to see why the launch (and debugging fails)?

Here is a short clip of what happens when it fails:

Screencast from 2024-01-11 23-11-43.webm

maziac commented 6 months ago

A few basic questions first:

From what I can see from the video there seems to be a connection between dezog and zesarux as the (smart) loading starts.

I have also tested on my Mac with your setup (your tasks.json) and debugging works fine for me. Do you start zesarux from your tasks.json or do you start it manually with other command line arguments?

For the diagnostics: In the "OUTPUT" tab select the "DeZog Transport". It logs the whole communication between dezog and zesarux. If something goes wrong or stucks, most likely it can be seen here. Please clear the window, start a new debug session and then attach the log here. There is also another log "DeZog", please attach the log (from the same session) as well.

timlinux commented 6 months ago

Hi

Thank you for taking the time to reply to my issue. Answers in line below:

A few basic questions first:

* The z80-sample-program is also not working for you, correct?
* Did you succeed starting the program in the internal simulator? Could you 'step' in there?

Neither approach works for me - I have made a light fork of your z80-sample-program which uses direnv and nix shell to repeatably create a from-clean setup environment. Assuming no changes are needed to your sample program after checking it out, for me it also does not run.

Screencast from 2024-01-14 18-45-04.webm

Unfortunately I could not test with CSpect since it it not packaged for NixOS. I do have fuse-emulator installed but it seems that is not supported by DeZog.

From what I can see from the video there seems to be a connection between dezog and zesarux as the (smart) loading starts.

I have also tested on my Mac with your setup (your tasks.json) and debugging works fine for me. Do you start zesarux from your tasks.json or do you start it manually with other command line arguments?

I have tried it both using the task and manually from the command line. The above screencast shows me testing using the task. Note I made two small tweaks to the task in my fork in order to allow it to launch:

image

For the diagnostics: In the "OUTPUT" tab select the "DeZog Transport". It logs the whole communication between dezog and zesarux. If something goes wrong or stucks, most likely it can be seen here. Please clear the window, start a new debug session and then attach the log here. There is also another log "DeZog", please attach the log (from the same session) as well.

Hmm yeah that is where I went to look for logs first when I got issues, but for me, I don't have any DeZog option.

Screencast from 2024-01-14 18-56-23.webm

Maybe there is something peculiar with my environment. I will test on a Mac I have here and see if I also get the same problem there. I'll update this issue after.

Thanks!

maziac commented 6 months ago

There is something wrong with your dezog installation as far as I can see. If dezog is installed right you should be able to use the internal simulator. It does not have any dependency to some other component. Additionally the OUTPUT logs are not appearing.

Have you tried to install the extension (the six) from within vscode? The vsix files can be found under dezog-github releases.

timlinux commented 5 months ago

@maziac thanks for your feedback above. So I went and did some testing:

I guess there is something going on with the way VSCode is packaged on nixos, or the way that DeZog works which isn't compatible with the NixOS filesystem layout etc.

timlinux commented 5 months ago

I am going to close this for now as I don't have enough knowledge of VSCode to figure out why Dezog does not install properly. For now I found a work around to use Lima to set up an Ubuntu container and run vscode in my browser - as described in my notes here : https://github.com/timlinux/z80?tab=readme-ov-file#running-under-lima

timlinux commented 5 months ago

Thank you for trying to help by the way @maziac