Debugging FB

For debugging and development it's a good idea to build the compiler with -g and -exx to enable assertions, plus array boundary and null-pointer checks. For the rtlib/gfxlib2 code, -DDEBUG enables the assertions. Just update and (re)build. Example settings:

FBFLAGS := -g -exx

Running fbc inside gdb typically looks like this:

gdb --args fbc foo.bas

Running fbc inside valgrind typically looks like this:

valgrind fbc foo.bas

Also note that fbc can be tested right from inside the build tree, without having to be "installed" somewhere else, which also is a great debugging and development help.

Back to FreeBASIC Developer Information

Back to Table of Contents
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki phatcode