• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ArkScript-lang / Ark / 20948190269

13 Jan 2026 07:19AM UTC coverage: 92.246% (-0.5%) from 92.743%
20948190269

Pull #628

github

web-flow
Merge 59ad4b9eb into ada0e0686
Pull Request #628: Feat/debugger

52 of 115 new or added lines in 6 files covered. (45.22%)

2 existing lines in 1 file now uncovered.

8506 of 9221 relevant lines covered (92.25%)

279965.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/arkreactor/VM/Debugger.cpp
1
#include <Ark/VM/Debugger.hpp>
2

3
#include <fmt/core.h>
4

5
namespace Ark::internal
6
{
7
    // TODO: Create a new context?
8
    //       Creating a new context meaning modifying where the scope views points to,
9
    //       because the underlying storage won't have the same address.
NEW
10
    Debugger::Debugger(const ExecutionContext& context)
×
NEW
11
    {
×
NEW
12
        saveState(context);
×
NEW
13
    }
×
14

NEW
15
    void Debugger::saveState(const ExecutionContext& context)
×
NEW
16
    {
×
NEW
17
        m_states.emplace_back(
×
NEW
18
            std::make_unique<SavedState>(
×
NEW
19
                context.ip,
×
NEW
20
                context.pp,
×
NEW
21
                context.sp,
×
NEW
22
                context.fc,
×
NEW
23
                context.locals,
×
NEW
24
                context.stacked_closure_scopes));
×
NEW
25
    }
×
26

NEW
27
    void Debugger::resetContextToErrorState(ExecutionContext& context)
×
NEW
28
    {
×
NEW
29
        const auto& [ip, pp, sp, fc, locals, closure_scopes] = *m_states.back();
×
NEW
30
        context.locals = locals;
×
NEW
31
        context.stacked_closure_scopes = closure_scopes;
×
NEW
32
        context.ip = ip;
×
NEW
33
        context.pp = pp;
×
NEW
34
        context.sp = sp;
×
NEW
35
        context.fc = fc;
×
36

NEW
37
        m_states.pop_back();
×
NEW
38
    }
×
39

NEW
40
    void Debugger::run()
×
NEW
41
    {
×
42
        // TODO: create a shell
NEW
43
        fmt::println("debugger running");
×
NEW
44
    }
×
45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc