Start a Console Window and deploy all `Console.WriteLine` info

Hello,

So I know I can write string text into Rhino command line by RhinoApp.WriteLine.
I also know that I can write it to grasshopper output.

The case I’m facing is a bit different:

I’m running some optimization problem with a third-party solver (Gurobi, in this case). It has some implicit function to output to the console, where I can see more information.
But as it is implicit, I cannot get those strings out and re-write it to Rhino/GH.

Is there a way to just start a console from Grasshopper (.NET GUI?) so that Console.WriteLine can work as normal?

For instance, the info in the red frame are all from the implicit function, and I have no ways to output it to GH panel.

Untested, but perhaps you could set Console.Out Property (System) | Microsoft Learn ?

Unfortunately it doesn’t work.
This Console.Out can redirect your WriteLine to the output streamWriter, but cannot redirect the WriteLine inside the implicit function (which is actually Console.WriteLine, not Console.Out.WriteLine)…

I think for my case, the only way is to activate a real Console window. Which I don’t know how to do.