how to 1-debug 'bokeh serve' when embedded in flask, 2-pass arguments from flask to bokeh

Hi,
I run a bokeh server with subprocess.Popen([‘bokeh’, ‘serve’, ‘app.py’], … ), e.g. no stdout and stderr specified;

I use pull_session(url) , followed by session.push(), to get jsscript from server_session(model=None, session_id=session.id, url=url, arguments=args)

The issue I have is that the arguments (args) not passed to bokeh in curdoc().session_context.request.arguments.

To debug if I use print() in the bokeh app, the output not printed in ‘python flaskapp.py’, though the errors are.

Thanks