I dont have any insight for how to make this work but how would a debugger implement this?

Are you trying to break on code in the headers, or just list source? I dont have any insight for how to make this work but how would a debugger implement this? A header file could result in code injected into many translation units. Once its all linked together, I believe there can still be duplication. How would a debugger track back to a header file at that point?
You already invited:

Benny

Upvotes from:

just list sources. You're right that the headers indeed get injected against more than one translation unit, but still the debugger should easily print _the content of the header file_ when the valid path is given to it.

I believe this has nothing to do with the translation units as it simply prints the plain text of the header file.

At this point I don't understand why the debugger can't even do that; switching back to a different shell/editor to look at the corresponding header is quite inconvenient.

> I believe there can still be duplication. How would a debugger track back to a header file at that point?
Actually `lldb` can track back to the corresponding _header_, although I understand what you mean by that.
`(lldb) step into` will let you land at the correct spot, because at that point, there's only one single valid unit from the call.

(Which makes this strange, because now I am able to _step into_ the header file I want with no problem, but the debugger just can't find the `.hpp` file when I simply ask it to print)

If you wanna answer this question please Login or Register