I'm developing asp.net core application + IronPython. But I've faced with the debugging issue...
So for example I have following code:
Dictionary<string, object> options = new Dictionary<string, object>();
options["Debug"] = true;
ScriptEngine engine = Python.CreateEngine(options);
// output redirect
var eIO = engine.Runtime.IO;
var errors = new MemoryStream();
eIO.SetErrorOutput(errors, Encoding.Default);
var result = new MemoryStream();
eIO.SetOutput(result, Encoding.Default);
// execute script
ScriptScope scope = engine.CreateScope();
scope.SetVariable("testGlobalVar", 10);
engine.ExecuteFile(ScriptPath, scope);
in python file
some = "Test"
print(Test)
print("We have ->", testGlobalVar)
It works fine, but I don't know how to set breakpoint in python file and debug it step by step in Visual Studio, Pycharm(whatever), when running it via C#.
I found this question but it's almost completely useless. I'm setting breakpoint in python file and nothing happens.