From GridLAB-D Wiki
The pauseatexit global variable enables a pause feature when GridLAB-D exits. Some shell automatically close when the gridlabd process exits and messages displayed are lost. Enabling this feature makes it possible to read those message before the shell is closed.
GLM
#set pauseatexit=1
Command line
host% gridlabd -D pauseatexit=1