For debugging purposes it is very convenient to be able to start the zato server in the foreground (–fg) and use pdb statements inside the python code of services. For zato 2.0 this used to work, for Zato 3, this stopped working. Stdout shows a traceback, but no pdb prompt.
I tried redirecting stderr to stdout, but that did not work. Has something been changed in the way ‘–fg’ works?
Great that you found the reason and made a fix already!
So, to have interactive pdb debugging in services, do the following.
In a Zato instance (eg. created with quickstart), start the web-admin and load-balancer in the regular way (zato start <dir-of-service>).
Start a zato server in the foreground: zato start server1 --fg
In the service that needs debugging add the pdb statement (usually: import pdb; pdb.set_trace())
Add a REST channel for this service
Trigger the service by curl-ing the REST channel
Now in the terminal where zato is running in the foreground, the interactive pdb prompt appears, and you have all the pdb niceties available.