The NexaVM Debugger is a web-based tool designed to provide developers with powerful infrastructure for developing and executing smart contracts on the blockchain. It offers an advanced debugging experience with step-by-step script inspection, stack visualization, and fine-grained control over script execution. Developers can now roll backward and forward through each step of the clock cycle, improving efficiency when working with Nexa’s unique VM and scripting environment.
NexaVM Debugger
The NexaVM Debugger is a browser-based application that lets you load, inspect, and interact with scripts in real time. Scripts are organized into tabs, while the Nexa Virtual Machine state is displayed on the right-hand side. This view includes machine registers, execution status, and two stack windows: the main stack and the alt stack.
Stacks grow downward, with the first element at the bottom, a design that matches the natural “push” direction of scripts. For example, running 1 2 3 results in the stack appearing as 1 2 3 (bottom to top), not reversed. Each stack line provides multiple representations of the item: index, data type, length, hex, and a “natural” representation depending on the item type. These details make heavy debugging work much easier.
Controls and Features
The top bar of the debugger includes essential tools to manage and control script execution.
-
Execution control: step (>), continue (>>), rewind (<), or reinitialize (<).
-
Snapshots: save and restore NexaVM states with the Snapshot button.
-
Clipboard tools: copy and paste scripts directly.
-
Persistence: upload or download saved NexaVM states to resume where you left off.
-
Breakpoints: toggle by clicking next to a script line, allowing targeted execution halts.
Together, these functions make it possible to move forward or backward through opcodes, freeze execution at precise moments, and revisit earlier states without restarting from scratch. This provides developers with a level of control rarely found in blockchain script debuggers.
Running Scripts
The debugger comes with a Template tab where you can paste scripts for execution. For instance, a simple example initializes NexaVM with a large integer, then applies shift and multiplication operations, demonstrating NexaVM’s bignum capabilities. More advanced usage involves NexaVM State Setup. By pasting two related transactions (one spending the output of the other), developers can recreate a realistic transaction state inside the debugger. From there, you can step through execution, rewinding as needed, while the debugger automatically executes push-only scripts.
This is unfinished software and may contain issues, but you can start using it at debug.nexa.org.
Conclusion
The NexaVM Debugger is still under active development, but it already represents one of the most powerful tools available for scripting on a blockchain. By combining stack inspection, state snapshots, precise stepping, and real transaction context, it equips developers with everything they need to debug, experiment, and refine their smart contracts effectively.