From GridLAB-D Wiki
The debug option produces all the debugging output from GridLAB-D. It is managed by the global variable debug, which is by default FALSE.
GLM
To enable debug mode use the directive
#set debug=1
To disable debug mode use the directive
#set debug=0
Command line
To toggle debug mode use the option
host% gridlabd --debug
To enable debug mode use the option
host% gridlabd -D debug=1
To disable debug mode use the option
host% gridlabd -D debug=0