DeZog icon indicating copy to clipboard operation
DeZog copied to clipboard

srcPath appears to need an absolute path.

Open cdoty opened this issue 2 years ago • 6 comments

Describe the bug Setting a directory, relative to the base directory, does not allow setting breakpoints in files located outside of the base directory.

To Reproduce Using sjasmplus, I have assembled my code with either --fullpath added or removed and using SLD files. My code includes files from "../Shared". I set "srcDirs": ["../Shared"]. "srcDirs": [], "srcDirs": [""] or"srcDirs": ["."] does not fix the issue Setting breakpoints in any file in "../Shared" does not work. The only way breakpoints work is if I include the the absolute path to the Shared folder.

Version etc. (please complete the following information):

  • DeZog SW Version: 2.7.3
  • OS: Windows 11
  • Remote: zrcp (ZEsarUX):

Additional context If possible please attach your complete Z80 project as a zip file. It should also include the .vscode folder with the launch.json file and the list (.lst) file.

cdoty avatar Aug 20 '22 00:08 cdoty

Added Test.zip

cdoty avatar Aug 20 '22 00:08 cdoty

I have a fix for that. Please try dezog-2.7.4-rc1.vsix. You find it here: https://github.com/maziac/DeZog/releases/edit/v2.7.3

I didn't knew that someone is trying to debug the coleco system with DeZog.

You have a launch.json entry also for MAME. MAME support is kind of experimental at the moment. What are you experiences? Does it work for you?

maziac avatar Aug 20 '22 11:08 maziac

That works great. It was a project that I picked from my Github project (https://github.com/cdoty/9918-Adventures) to try out debugging. ZEsarUX supports a lot of TMS-9918a based targets, which is nice.

The launch just launches the MAME debugger. I will set it up to test it with Dezog though.

cdoty avatar Aug 22 '22 00:08 cdoty

The Mame version worked fine also. I'm using Windows, so I had to add a pause in the do while loop to allow the compiler to rebuild the program. For some reason Mame keeps the rom files open.

cdoty avatar Aug 22 '22 01:08 cdoty

Oh, that's a good finding. How long you need to pause / can you put your command line here.

The gdbstub in MAME is, unfortunately, not reconnecting. Having disconnected once, you need to restart MAME. Therefore I'm thinking of providing a lua gdbstub. Would also enable more features.

maziac avatar Aug 22 '22 17:08 maziac

I just used "pause" in a Windows bat file. It will pause until a key is pressed.

In VS code, I exit out of MAME, recompile the code, and press a key in the window running the MAME bat file:

set WORKING_DIRECTORY=%cd%

cd \mame :while mame coleco -window -debugger gdbstub -debug -debugger_port 12000 -verbose -cart %WORKING_DIRECTORY%\Game.col pause @GOTO while

cd %WORKING_DIRECTORY%

cdoty avatar Aug 23 '22 05:08 cdoty