Would it be possible to have some more specific debugging for runtime errors? For example, say I have two files:
base_game/+declaration.dm
players/+declaration.dm
..and I get an error in some proc in players/+declaration.dm, would it be possible for the runtime error to say "runtime error: foo at line 97 in players/+declaration.dm" (as opposed to just +declaration.dm)? It looks like this is possible since the .dme keeps track of all of the files, but I don't know if it's possible to tell them things related to their folders, too.
ID:108025
![]() Feb 3 2011, 6:20 am
|
|||||||
Resolved
| |||||||
![]() Feb 3 2011, 2:31 pm
|
|
#define DEBUG?
|
No, it doesn't tell you the folder, just the file. If I have two files of the same name, for whatever reason, they won't report which folder they're in, even though it's often simple to figure out, it may not always be the case.
|
When DEBUG is defined, include full (relative to project directory) paths to code files, rather than just the file name itself.
In our codebase, we have a layout like this: mob\living\carbon\human\hud.dm mob\living\carbon\monkey\hud.dm mob\living\silicon\ai\hud.dm When an error occurs, we have to investigate which file it actually was. Having full paths would improve error information. :) |
This would be very helpful.
I've ran into this very same issue with a bug which was in code/social/party.dm but I kept checking code/HUD/party.dm. |
http://www.byond.com/members/ BYONDHelp?command=view_tracker_issue&tracker_issue=2687
I asked about this a while back. |
Bump. This is still relevant for the same reasons, but hasn't had any official response.
|
It looks like the compiler is just saving the file name without any path info. I'll have to take a look at where this is done and whether it's an easy fix. It depends on how the file name is kept internally.
|
Yeah this is still really necessary to being able to keep both a sane codebase and reasonable errors
|
This is still an extremely necessary functionality, we have like 10 files named life.dm. They are completely reasonably named and we should not have to stutter human/human_life.dm in order to actually get reasonable exceptions.
|
Please fucking anything I wish to be free from this fresh hell of a debugging and tooling system.
We could have like, nice viewers that take a runtime and point you at the file and line, but we DON'T HAVE THE FILE. |