From GridLAB-D Wiki
Jump to: navigation, search

GRIDLABD_DEBUG -- Runtime debugger command


/bin/bash$ export GRIDLABD_DEBUG=debugger


When the environment variable GRIDLABD_DEBUG is set, the script /usr/local/bin/gridlabd starts the specified debugger and opens the file /usr/local/bin/gridlabd.bin. This enables debugging of your code.

If you enable debugging using debug or by including -g in CXXFLAGS and LDFLAGS then you will be able to set a breakpoint in your runtime code. When the GRIDLABD_DEBUG environment variable is set, the C++ source file is not deleted after the runtime code is compiled. This file can be found in your temporary folder, which is specified by the tmp global variable.

Important note: when GRIDLABD_DEBUG is set, the runtime compiler does not delete the C++ implementation file of runtime classes. This is important if you want to debug the implementation itself and can be used in combination with the noglmrefs global variable to allow debugging of the runtime implementation.


This environment variable is supported as of Keeler (Version 4.0)

See also