Why would the debugger ignore an include file?

BlitzMax Forums/BlitzMax Programming/Why would the debugger ignore an include file?

Gabriel(Posted 2005) [#1]
I have an include file with a user Type, containing a few globals, a few constants, and a few functions. It's included, NOT imported.

The debugger completely refuses to point to anything in that file when debugging though. Any error in a function within the type in that include file only registers an error on the function call itself, in another include file.

This doesn't generally happen, and in fact I've never seen it happen before. And the error is most definitely NOT connected to the function call, nor is it connected to the Function return value because there is none and I've found the errors in some cases.


Michael Reitzenstein(Posted 2005) [#2]
Yeah, I have that problem too. What you need to do is double click (if the IDE doesnt crash) on the lowest point on the debug stack trace, and the IDE will open up to the right place.


FlameDuck(Posted 2005) [#3]
Isn't this because of the way Include works? Since it's effectively a copy/paste into your "main" source code, the error is (from the debuggers point of view) in fact in that file?


Koriolis(Posted 2005) [#4]
*Because* like in "it's normal" ? No.
It's supposed to work. After all even without include, the compiler does'nt *need* any information like the source file path and line numbers. But if the debugger can point you to the offending line in the right file when an error occurs, it's because the compiler (when in debug mode) emitted the needed information for the debugger's use. When you do an include "bla.bmx", it must emit the information that for the corresponding code, the file is now "bla.bmx".
Chances are there is a problem with this.


Gabriel(Posted 2005) [#5]
Thanks Michael, that worked great.

FlameDuck: No, it's not because of the way include works. I'm not even sure what the difference is between the include file that has this problem and the ones that don't. Perhaps it just occurs after you have a certain number of include files or something. It should work, and usually does ( for me ) but apparently it doesn't always.


Michael Reitzenstein(Posted 2005) [#6]
It never works for me, possibly due to the high number of includes (96). The behaviour seems to be consistant that if the include file is open, it'll go to the offending line in it, but if it isn't open, the IDE won't open it.


Gabriel(Posted 2005) [#7]
I've only reached my eighth include file, which is the one that won't get highlighted by the debugger. It actually is open though, so that's not the only factor.