[FEATURE/INTENDED?] Debugging and running uses the current edited (or selected) file as the starting point?
See original GitHub issue(Apologies, this one is hard to explain, cos it’s a UX / familiarity thing)
I have a program in a few files:-
A main file (code.z80asm) A common definitions file (common.z80asm) Some library function files. (e.g. fonts.z80asm)
My main code looks like this
.org 8000
<some Assembly>
#include "common.z80asm"
#include "fonts.z80asm"
When I compile the solution by right-clicking on the project in the Solution Explorer, or the code.z80asm file, the compilation works perfectly.
BUT: When I attempt to debug by right-clicking on a different file (e.g. fonts) or using the ^M^R hotkey combination while editing the fonts.z80asm (which depends on common.z80asm) I get dependency errors, as if “Debug Program” is only attempting to compile and run THAT FILE, and not the whole program.
If this is intended, may I recommend changing the text in the context menu to be “Compile FILE” or “Debug FILE” etc, but leave the context menu options on the project as “Compile PROGRAM”, so that it’s clear that the two have different effect?
However, with ^M^R & ^MR, as this feature is ONLY available by right-clicking on the project (as “Run Program”/“Debug Program” (not on “Debug File”), no matter where I am editing, I would expect it to attempt to compile the whole project rather than work at the file-level… It just means that I cannot make an edit and quickly debug, I have to sort through the files, locate the code.z80asm and do it from there each time (cf. pressing F5 in C# where you can do it from any file).
SECONDLY… I don’t #include “common.zx80asm” in the fonts file. Should I be? The compiler does not complain of duplicated labels if I don’t put #ifndef guards within common.z80asm even when it’s being (theoretically) included multiple times… In C+±land this would throw me “blahblah already defined” errors 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
I have uploaded a video to demonstrate the different ways to compile / run…
https://youtu.be/QaTvpky7LMM
Interestingly, OBS does not capture the pop-up menus!!! I didn’t notice that 😦
hopefully that demonstrates what I mean. 😃
😃 Thanks