You can start darkable from within a console with various debugging options.
Try darktable -d lua for debugging LUA scripts.
I guess it is related to an API change. coroutine.yield has been replace by darktable.control.execute. There is another script which should ensure compatibility: https://github.com/darktable-org/lua-scripts/blob/master/official/yield.lua
So you do not need to change the gimp.lua script.