Hi, I have followed the Iron Python debugger demo (Windows Forms) and can successfully debug a script. However, in my project, my scripts are stored in a database and would be edited one at a time. I can’t figure out how to debug a script without creating a DebugCodeEditContainer which requires a tab control. I was hoping to simply add a DebugCodeEdit control directly onto my form. If I do this, I can get the code to run but it ignores my breakpoints.
It also seems that I need to save the script to disk and load it from disk using scriptRun1.ScriptSource.FromScriptFile for debugging to work. Using FromScriptCode does not seem to allow handling of break points.
Cheers,
John
Hi Sirokai,
It’s possible to use the editor without tab control (you will need to set edit.. SingleEditorDebuggingUI to true).
Also, using the FromScriptCode method with an additional filename parameter and setting the same filename to the editor should allow debugging.
I’ve uploaded a sample demo here:
The following code should not be required; we will fix it in the next minor update:
debugger.Options.DisableJustMyCode = false;
Please let me know if it works for you.
Regards,
Andrew
Awesome - thanks that works. However when I break, I no longer have the tooltips to display the current values of variable. Is there an additional setting for that?
Hi John,
It seems that displaying debug tips when execution stops at a breakpoint works for me. Is this what you meant?
Regards,
Andrew
Yes that’s what I mean. I got it to work - it is just very particular about the order properties should be assigned. Thanks for your help.