Build

Integration

Integration is simple, only takes a few lines.

// create asPEEK, with a port and a pointer to script engineasPEEK*peek=newasPEEK(engine,9002);// function that loads a section, asPEEK does not assume anything about how you load script sectionspeek->LoadSectionFunction=&LoadScriptFile;// function that saves a section, optionalpeek->SaveSectionFunction=&SaveScriptFile;// add modules to peek so that we can lookup global variables in thempeek->AddModule(mod);// only the contexts you add will be debugged and paused when debugging starts.peek->AddContext(ctx);// add section to asPEEK, if you don't add sections you won't be able to see where current line is and step trough that section seeing the actual codepeek->AddScriptSection("sectionname","moduleName");// listen incoming connection. Creates its own threads.peek->Listen();// when you are done with itdeletepeek;

A simple LoadSection function

Since asPEEK does do any loading/saving itself, you need to supply it with a function pointer (or a member method with boost::bind).
This example straight up loads a file to 2nd parameter.

This function converts a Vector3 POD type to JSON format. String returned should be valid JSON. "_" member is object type as a string. It is optional, but if you like to see object type in debugger include it.

It is better not to include any space/tab/newline in this, since string is sent over sockets.

Is there an example/demo?

Yes. Look at the "example" folder for a simple integration sample.
Built version of this example available as Windows binary in the Downloads section.
Binary demo is most likely outdated.