embedding IronPython in a C# app, and using PTVS to edit and debug the application scripts

Mar 20, 2015 at 7:56 PM
Embedding IronPython in a C# app, and using PTVS to edit and debug the application scripts... is there any example?
Coordinator
Mar 20, 2015 at 11:58 PM
This book actually has a really good half-chapter on hosting IronPython in C#. I've never seen it explained any more simply than Martino does. Otherwise, you'll probably get a better response from one of the IronPython mailing lists for that part of the question.

As for the second part, simply having PTVS installed while you're working in a C# project should just work, provided IronPython has its debug mode enabled. When you step into Python code Visual Studio should open the file with the Python editor.

If you want to use a Python project that can launch the embedding application, you need to make it respond to command line arguments like ipy.exe does, but then you can specify it in the Project properties as the Interpreter Path. But chances are you want to be working in the C# project and letting VS just handle the Python bits when it gets to them.