1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Program executor used by the client's DAP debugging path.
//!
//! The transaction executor is generic over the VM program executor. This wrapper selects the
//! debug-aware executor used by
//! [`Client::execute_program_with_dap`](crate::Client::execute_program_with_dap), allowing a DAP
//! client to attach before execution, set breakpoints, step through the transaction script, inspect
//! VM state, and request restart without changing the normal transaction setup.
use AdviceInputs;
use ;
use ProgramExecutor;
/// [`ProgramExecutor`] adapter for the DAP debugging path.
///
/// TODO: Restore interactive DAP debugging. `execute` currently returns an error instead of
/// starting a debug session, so `Client::execute_program_with_dap` is non-functional. The adapter
/// is retained only so the `dap` feature keeps compiling and the debug path fails explicitly rather
/// than silently.
///
/// Why it is blocked: the DAP executor in `miden-debug` 0.9 drives execution from an
/// `Arc<Package>` (to expose package-owned source/debug info to the debugger), but
/// [`ProgramExecutor::execute`] only hands this adapter a bare [`Program`], and there is no
/// lossless way to reconstruct the owning package from a `Program` here.
///
/// Required fix (needs an upstream change, pick one):
/// - `miden-debug` exposes a `Program`-based debug executor (an `execute_async` that accepts
/// `&Program` instead of `Arc<Package>`), OR
/// - `miden-tx`'s [`ProgramExecutor::execute`] passes the owning `Arc<Package>` (or its package
/// debug info) alongside the `Program` so this adapter can forward it to `DapExecutor`.
///
/// Once either lands, replace the error stub below with a real `DapExecutor::execute_async(...)`
/// call and re-enable the `debug_mode_outputs_logs`-style coverage removed in the 0.16 bump.
;