Debugging problem...

BlitzMax Forums/BlitzMax Programming/Debugging problem...

pilgrim(Posted 2009) [#1]
I have a muli-file project that uses Include to add the necessary files for the build. Several days ago, I split one source (.bmx) file into 3 seperate files (.bmx) and updated my Include statements to reflect this change.

Since then, when I build in debug mode and there is any error that occurs in any if those three new files, the debugger stops in my base source file (the one with all the Includes) and highlights the function call for the function contained in one of the new files. In the past, if I have the correct source file open in the IDE, the debugger will highlight the offending line in the correct source file- not anymore.

I have checked to see if this occurs project wide or is limited to code contained within the newly split files and the latter is true. It is almost as if the debugger is still looking for the old source file and since it is gone, it stops.

Have any of you experienced this and found a solution?

Thanks,


Brucey(Posted 2009) [#2]
That's interesting :-)

"Include", compiles source files into one large pseudo source file before compiling. It seems like there's no information regarding the origins of the various parts (the separate files) for the debugger hook into - therefore that is probably why it hightlights the only bit it can refer to.

Import works fine, of course.


H&K(Posted 2009) [#3]
Just build the file you know the error was supposed to be in.

If you are going to split files, then try and make each file "Runnable"/Buildable by itself.
(Ok so we have the problems of cyclic referance:- Dont splt these, and Importing/including not in "main" file when you incude the file later on)


ziggy(Posted 2009) [#4]
@Brucey: this does not happens this way for any of the projects I've done in the last 4 years. Debugging always did inform of the correct file. It does not matter if the file is included or imported.


Brucey(Posted 2009) [#5]
Well, I've never used Include, so I really can't speak for it :-)


pilgrim(Posted 2009) [#6]
Thanks for the responses - I'm still trying to get this to work.

@Brucey: I've no experience w/Import and don't wish to embark on changing the way this project is built at this time - thanks though.

@H&K: Since I'm using Include, the files are definately not structured to be standalone buildable - to make them so would seem to defeat the whole purpose of breaking the project into tidy files based on subject matter. Again, I'm not willing at this point to restructure my whole project - 22 source files - to be standalone buildable.

These seem like workarounds to the problem. Does anyone now if there are some temporary files that are created that hold references to the files ina project that may not be getting refreshed for some reason?

Thanks for everyone's posts so far - I dont' mean to sound ungrateful.

Cheers!


Brucey(Posted 2009) [#7]
the files are definately not structured to be standalone buildable

Well, if they were you wouldn't want to be using Include anyway ;-)

Does anyone now if there are some temporary files that are created

None. Included files are merged in at build time by BCC (the BltizMax code generator).

The generated debug assembler code should hold references to the source files (so that it can hook back to those for error reporting and such-like).
If that isn't working, then I dunno what's wrong. ziggy probably has the best knowledge on this though, since he's done that IDE thingy :-)


ziggy(Posted 2009) [#8]
Have you tried turning off the quickbuild and deleting the .bmk folder? This sometimes solves problems.


pilgrim(Posted 2009) [#9]
@ziggy: Yes - first thing I check was my build parameters. I've turned off Quick Build and tried both GUI and non-GUI builds. I also deleted the .bmk folder as well as doing a complete BlitzMax re-install. No go still...

I'm going to try un-separating the three files and put their contents back into one file - since that started this whole problem. I did notice that they are the only files in my whole project that contain only one function each. Dunno, maybe Blitz doesn't like a single function .bmx file...we'll see.

Cheers!