Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

nww02commented, Mar 20, 2020

I have uploaded a video to demonstrate the different ways to compile / run…

Interestingly, OBS does not capture the pop-up menus!!! I didn’t notice that 😦

  1. Compile using the Code.z80asm “That Works”
  2. Debug using the Code.z80asm “That works fine”
  3. Compile Code using the rect_scroll.z80asm “That is to be expected, I’m compiling code in a file”
  4. run program using the rec_scroll.z80asm “That, I would not expect to happen”
  5. Use ^M^R using Code.z80asm “Similarly, if I use the keys, that works fine”
  6. Use ^M^R using rect_scroll.z80am “If I am in a different file… that does not work…”

hopefully that demonstrates what I mean. 😃

nww02commented, Apr 10, 2020

😃 Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging in Visual Studio Code
To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and...
Read more >
Run/debug configurations | IntelliJ IDEA Documentation
Learn how to use run configurations to run/debug your code in IntelliJ IDEA with various startup properties.
Read more >
Create and edit run/debug configurations | Android Studio
To define a run/debug configuration starting from a copy of another configuration, follow these steps: Open the Run/Debug Configurations dialog. Select an ...
Read more >
Attach to running processes with the Visual Studio debugger
After the process is running, select Debug > Attach to Process or press Ctrl+Alt+p in Visual Studio, and use the Attach to Process...
Read more >
12 Running and Debugging Java Projects
Open the Run/Debug/Profile page. Select a run configuration and click Edit. The Edit Run Configuration dialog displays. On the Launch Settings page, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found