maziac / DeZog

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

v2.0.2 - Breakpoints do not work if the file name is separated from the path by a backslash in the SLD file. #39

Closed Flk427 closed 3 years ago

Flk427 commented 3 years ago

This is how it works:

|SLD.data.version|1
||K|KEYWORDS|WPMEM,LOGPOINT,ASSERTION
D:\Spectrum\projects\project1\src/borders.asm|8||0|-1|-1|Z|pages.size:8192,pages.count:224,slots.count:8,slots.adr:0,8192,16384,24576,32768,40960,49152,57344
D:\Spectrum\projects\project1\src/borders.asm|11||0|4|32768|F|StackEnd

But this does not work ("Unverified breakpoint..." message into debug console):

|SLD.data.version|1
||K|KEYWORDS|WPMEM,LOGPOINT,ASSERTION
D:\Spectrum\projects\project1\src\borders.asm|8||0|-1|-1|Z|pages.size:8192,pages.count:224,slots.count:8,slots.adr:0,8192,16384,24576,32768,40960,49152,57344
D:\Spectrum\projects\project1\src\borders.asm|11||0|4|32768|F|StackEnd
maziac commented 3 years ago

Thanks for reporting. Could you maybe provide the complete project.

Flk427 commented 3 years ago

Here is project template. Look at the tasks.json file. In my case ${workspaceRoot} is a windows path with backslashes.

maziac commented 3 years ago

Could you attach the sld file as well. I cannot compile with your task.json on mac.

Flk427 commented 3 years ago

Placed sld in the same archive.

maziac commented 3 years ago

I changed the handling of the paths a little bit. Could you please try both cases with this version: https://github.com/maziac/DeZog/releases/tag/v2.0.3

Flk427 commented 3 years ago

Yes! Paths with mixed slash and backslash are working now! Thank you. And a happy new year! :)

maziac commented 3 years ago

Have you tested both cases? mixed and non-mixed.

Flk427 commented 3 years ago

Yes. I've tested even like this:

D:/Spectrum/projects/project1/src\borders.asm|7||0|4|32895|F|StackStart
D:/Spectrum/projects/project1/src\borders.asm|7||0|4|32895|L|,StackStart,,+used
D:/Spectrum/projects/project1/src\borders.asm|9||0|4|32895|F|StartAddress
D:/Spectrum/projects/project1/src\borders.asm|9||0|4|32895|L|,StartAddress,
D:/Spectrum/projects/project1/src\borders.asm|10||0|4|32895|T|
D:/Spectrum/projects/project1/src\borders.asm|11||0|4|32897|T|
D:/Spectrum\projects/project1\src\borders.asm|12||0|4|32898|F|MainLoop
D:/Spectrum\projects/project1/src\borders.asm|12||0|4|32898|L|,MainLoop,,+used
D:/Spectrum\projects/project1/src/borders.asm|13||0|4|32898|T|
D:/Spectrum\projects/project1/src/borders.asm|14||0|4|32900|T|
D:/Spectrum\projects/project1/src/borders.asm|15||0|4|32901|T|
maziac commented 3 years ago

Thanks, I will release it officially in a few minutes.

ped7g commented 3 years ago

JFYI: sjasmplus itself supports only correct slashes "/" .. the backslashes work only in windows OS "by accident", and are not officially supported. So inside asm source when writing paths for INCLUDE/SAVEBIN/... you should use "/" in file paths (and maintaining the correct case is also recommended) - that way your project should build to the same binary also with sjasmplus run at non-MS-windows computer.

Whether this extends also to VSC/DeZog... not sure, I don't know if VSC scripts work well with forward slashes, and I don't know how people deal with developing the same project with contributors using VSC on different platforms. But windows generally do accept forward slashes in file paths in WIN API calls (to be somewhat POSIX compliant), so I guess it will mostly work.