Jump to content
  • Advertisement
Sign in to follow this  
gilad_novik

AS IDE - Beta

This topic is 4515 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Here are my updates:

I now have a working dll to be used as an IDE. Since AS interface is still changing, and I didn't want to limit the debugger to a specific version of AS, I decided not to use AS inside the code, but rather to use a callback mechanism.

When creating the debugger, you need to pass it an interface that wrap the actual calls.

class asDebugCallback
{
public:
virtual bool Compile(const char*)=0;
virtual int Execute()=0;
virtual void Abort()=0;
virtual void Suspend()=0;
};

Inside your actual code, you need to implement that interface, and call the actual functions by yourself (using the context interface). That way, you can use a different version of the script engine even with an older version of the debugger.

When creating the engine, you supply your interface.

class asDebugApplication
{
public:
virtual bool Start()=0;
virtual void Stop()=0;

virtual void Show()=0;
virtual void Hide()=0;
};

asDebugApplication* pApp=asDebugCreateApplication((asDebugCallback*)pMyCallback);
assert(pApp);
pApp->Show();
pApp->Start();

That's the general idea. I'm still testing it (for now there are no problems), and I'll upload it soon when it's ready for release.

If you have any comment about the way it works, please post them here.

Gilad

Share this post


Link to post
Share on other sites
Advertisement
Now this sounds like a really useful thing for application developers that use AngelScript :)

I look forward to seeing how this turns out.

Share this post


Link to post
Share on other sites
Here is the first release: http://gilad.gsetup.com/ASDebug.zip

Some notes:

In order to make it easier to bind to AS, there is a file called "ASDebugContext.h" which calls the actual context from AS. Check "MainDlg.h" to see how to implement it in your code ("MainDlg.h" is just the file from my test application. Don't try to compile it, it's there for reference only).

There are some notes inside "ASDebug.h", please verify it's clear enough for you.

I'll add some more functions to the interface soon, so you'll be able to customize the debug window.

Please note that currently the window is running in its own thread. Since I need to handle idle messages and translating of accelerator commands, I've decided to put everything in a seperate thread so you won't have to do it yourself in your code.

Since I'm terrible writing documents (and english is not my strong language), I'll be glad for any help writing some documents so I can create a webpage for the debugger.

Some technical notes: Everything was written using ATL/WTL. There are no known dependencies. Editor is based on Scintilla control.

Gilad

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!