From the post before it can be realized that we do need some dynamic environment.
But how is it easy to achieve this?
Today I will talk about some common things. For these things one cannot find a good answer.
Is this easy ? It should be, but not always.
Lets start from MS supported products.
VBA: So how do you do this in VBA ? There is a whole world of support. It works in all MS Office programs, moreover I there are more programs with VBA support. E.g. AutoCAD support VBA programming.
Scripting technology: Here you have a bunch of interfaces and baz words like “Machine Debug Manager” and “Process Debug Manager”. Active Scripting API
After reading a lot and trying a lot without a success you can manage to debug a script which runs in your executable file.
What with the open source projects?
Lua: There is no built-in debugger attached with the lua implementation from lua.org.
But there is a debugger called Decoda. It costs money of course if you are not sure. ![]()
It works very nice. It doesn’t work good with the compiled lua code and code in release. But works.
Python: You can try PDB.
Wingware claims to debug embedded Python script.
I did not check them, you can try and tell me if it works.
Ruby:Internet search (like with Python) gives the ruby-debug, it seems very similar to python debugger (pdb).
What with other languages ? There are few widespread scripting languages, so if you have something good and works, you can point me to.
What the next?
How you can call from script to your language, and from your language to the script?
The best what I know is the Boost.Python implementation.
It supports whatever you want and it works, yeah ! ![]()
For Lua you have luabind of luabridge libraries, they are pretty good too.
There are more libraries than I can think about, so use the Internet search.
What we have for Ruby language: Rice
What about ActiveScripting ?
Here you have just to implement COM object and you are in. It was too easy, so the long answer that you have to implement IDispatch interface and maybe to write some more magic. To make it shorter, ATL solves all your problems.
The only problem with this that there is no automatic way to expose your classes to the script.
Not so!
With Boost.Python you have Pyste and the newer Py++:

Looks just great. It uses GCC XML so it can be a problem for some incompatible code.
One day we can see automation support for other scripts too.
For Active Scripting you just do nothing, because every COM object can be used automatically.
The only disadvantage of this technology that it is not cross platform. (You can use WINE to make it cross platform
)
What else bothers you with the scripting languages ?
Something about the scripting virtual machine: Speed and size, multithreaded support.
Something more about the language itself: Strong typed or non strong typed. duck typing.
Conclusion:
In my opinion if you want some scripting environment in your program make it easy and extendable enough.
P.S.
Yes, I did not mention Perl language. If someone can give me a good link for Perl language debugging and embedding, it would be nice.