Adds support for debugger.
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is failing

This commit is contained in:
2021-10-23 14:28:53 +02:00
parent 77dd8e708a
commit 7043b12f34
7 changed files with 43 additions and 19 deletions

View File

@@ -13,8 +13,17 @@ public:
void Run(asIScriptContext* ctx) {
ctx->PushState();
ctx->Prepare(_function);
ctx->SetUserData(_env.get());
ctx->SetUserData(_env.get(), 684);
auto e = ctx->Execute();
if (e == asEXECUTION_SUSPENDED) {
auto s = ctx->GetState();
while (s != asEXECUTION_FINISHED && s != asEXECUTION_EXCEPTION && s != asEXECUTION_ABORTED &&
s != asEXECUTION_ERROR) {
s = ctx->GetState();
continue;
}
}
_env->CollectGarbage();
if (e == asEXECUTION_EXCEPTION) {
_errorMessage = ctx->GetExceptionString();
@@ -23,7 +32,6 @@ public:
return;
}
ctx->PopState();
Ensure(e == asEXECUTION_FINISHED);
_result = TestResult::Success;
}