Hi,
Sorry for the confusion. Please see the comment on github regarding OpenOCDPackage.
The behavior you are describing with gdb stub is to be expected. After your program initializes, it calls gdbstub_init() that outputs the “$T05#b9” packet and waits for gdb to connect. This is needed so that you can debug the initialization code of your program. If gdb never connects, ESP8266 will wait forever.
We recommend disabling the call to gdbstub_init() in the release builds to avoid this.