Did you know ... Search Documentation:
Predicate thread_run_interactor/0
 thread_run_interactor[private]
Attach a console and run a Prolog toplevel in the current thread.