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

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

I use pull_session(url) , followed by session.push(), to get jsscript from server_session(model=None,, 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’, though the errors are.