Ravi Dhoble
Member
- Joined
- Dec 11, 2019
- Messages
- 13
- Programming Experience
- 1-3
Hello,
I am working on building a GUI based script editor application (Thought of using blockly) to get the python code from blocks. It's a combination of C# and IronPython. I am using IronPython as a background engine to execute python scripts created by the user. Below, the first screenshot shows the integration of IronPython in CSharp.
I can execute the script in one go and get the result at the end of execution in the console window but I want to control the flow of execution. I want to add a breakpoint, step into, step out etc operation while the py script is running (during runtime). For reference, here is the 2nd screenshot of NI TestStand software, in which the execution of the script is done step by step and the next step in the script waits for the previous step to execute completely. So, using IronPython API how can I implement debugging features? and Can I use Microsoft.Scripting.Debugger classes, to have a debugging option in my software?
I am new to C# and Python and learning along the way. So, I have searched a lot about attaching the debugger process but not sure how to implement it.
Few more queries -
1. Here, can I use PDB python debugger to implement debugging features in the IronPython?
2. How to attach the debugger to the IronPython engine?
3. I read about Microsoft.System.Diagnostic.debug classes or is there any other approach? Hope to get guidance from this community forum.
CSharp_IronPython_App-
NI Teststand...
I am working on building a GUI based script editor application (Thought of using blockly) to get the python code from blocks. It's a combination of C# and IronPython. I am using IronPython as a background engine to execute python scripts created by the user. Below, the first screenshot shows the integration of IronPython in CSharp.
I can execute the script in one go and get the result at the end of execution in the console window but I want to control the flow of execution. I want to add a breakpoint, step into, step out etc operation while the py script is running (during runtime). For reference, here is the 2nd screenshot of NI TestStand software, in which the execution of the script is done step by step and the next step in the script waits for the previous step to execute completely. So, using IronPython API how can I implement debugging features? and Can I use Microsoft.Scripting.Debugger classes, to have a debugging option in my software?
I am new to C# and Python and learning along the way. So, I have searched a lot about attaching the debugger process but not sure how to implement it.
Few more queries -
1. Here, can I use PDB python debugger to implement debugging features in the IronPython?
2. How to attach the debugger to the IronPython engine?
3. I read about Microsoft.System.Diagnostic.debug classes or is there any other approach? Hope to get guidance from this community forum.
CSharp_IronPython_App-
NI Teststand...
Last edited: