That will work fine. I can create a config parameter in our application (or maybe tie into log4net IsDebugEnabled) and we can change how we invoke ScriptEngine.
Next piece of the puzzle is about to manage scripts themselves. We currently have rich text editors within the application that directly store code as string. I'm thinking we need to move to more of a script library approach where application references scripts that have been stored to a database. This would mean user experience is to use IPy VS and we would need some VS add-in to save those files to our db behind the scene. Any thoughts or experiences appreciated. -----Original Message----- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Dino Viehland Sent: Wednesday, September 01, 2010 9:49 AM To: Discussion of IronPython Subject: Re: [IronPython] Question about Visual Studio & IronPython Toolsand Debugging Yep you'll need to write it out to a file and then create the ScriptSource object using the file instead of the in-memory stream. The filename will then be carried along w/ the ScriptSource and when the debugging information is emitted it will be emitted w/ that filename so the debugger can pick it up. Also you won't want to always leave debugging mode on - it's much slower to compile the code in debugging mode than it is in normal mode. I'd like to eventually start supporting sys.settrace style debugging which won't have this penalty but that won't happen anytime soon. > -----Original Message----- > From: users-boun...@lists.ironpython.com [mailto:users- > boun...@lists.ironpython.com] On Behalf Of Marty Nelson > Sent: Wednesday, September 01, 2010 9:44 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Question about Visual Studio & Iron Python Toolsand > Debugging > > > Setting DebugMode seems easy enough. > > The script code is loaded from an in-memory string. Would we need to > write it out to temp file first for debug case? How does debugger > "know" what source is? > > Thx > > -----Original Message----- > From: users-boun...@lists.ironpython.com > [mailto:users-boun...@lists.ironpython.com] On Behalf Of Dino Viehland > Sent: Wednesday, September 01, 2010 9:29 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Question about Visual Studio & Iron Python > Toolsand Debugging > > The scripts need to be started in debug mode and be stored in files > somewhere on disk (so Visual Studio can load the source code). To > enable > debug mode you can set the DebugMode property on the ScriptRuntimeSetup > object. > > So this ends up looking like: > > var setup = Python.CreateRuntimeSetup(); > setup.DebugMode = true; > var runtime = new ScriptRuntime(setup); > > Alternately can also pass in "Debug" = true to the IDictionary<string, > object> when > creating a Python engine: > > var dict = new Dictionary<string, object>(); > dict["Debug"] = true; > Python.CreateEngine(dict); > > When you attach all of the Python code should be debuggable. > > > > -----Original Message----- > > From: users-boun...@lists.ironpython.com [mailto:users- > > boun...@lists.ironpython.com] On Behalf Of Marty Nelson > > Sent: Wednesday, September 01, 2010 8:42 AM > > To: Discussion of IronPython > > Subject: [IronPython] Question about Visual Studio & Iron Python Tools > and > > Debugging > > > > > > How does debugging work when attaching to a process with IPy Tools in > > Visual Studio? > > > > Can I attach to an .NET application that has extension points that go > > into ScriptEngine and "debug" the Python scripts? > > > > ======= > > Notice: This e-mail message, together with any attachments, contains > > information of Symyx Technologies, Inc. or any of its affiliates or > > subsidiaries that may be confidential, proprietary, copyrighted, > > privileged and/or protected work product, and is meant solely for > > the intended recipient. If you are not the intended recipient, and > > have received this message in error, please contact the sender > > immediately, permanently delete the original and any copies of this > > email and any attachments thereto. > > _______________________________________________ > > Users mailing list > > Users@lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > Users mailing list > Users@lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > ======= > Notice: This e-mail message, together with any attachments, contains > information of Symyx Technologies, Inc. or any of its affiliates or > subsidiaries that may be confidential, proprietary, copyrighted, > privileged and/or protected work product, and is meant solely for > the intended recipient. If you are not the intended recipient, and > have received this message in error, please contact the sender > immediately, permanently delete the original and any copies of this > email and any attachments thereto. > _______________________________________________ > Users mailing list > Users@lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ======= Notice: This e-mail message, together with any attachments, contains information of Symyx Technologies, Inc. or any of its affiliates or subsidiaries that may be confidential, proprietary, copyrighted, privileged and/or protected work product, and is meant solely for the intended recipient. If you are not the intended recipient, and have received this message in error, please contact the sender immediately, permanently delete the original and any copies of this email and any attachments thereto. _______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com