hal0x2328 / LocalDebugger

A debugger plugin for neo-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LocalDebugger

a neo-cli plugin for debugging historical Neo smart contract executions

Compile

git clone https://github.com/hal0x2328/LocalDebugger
cd LocalDebugger
dotnet restore
dotnet publish -c Release

Install

See Neo Plug-ins page

Usage in neo-cli prompt:

debug {on|off} - enable debugger
bp {script hash} {offset} - set a breakpoint on a smart contract
tbp {tx hash} - set a breakpoint on a transaction
bbp {height} - set a breakpoint on a block
br {script hash} {offset} - remove a breakpoint on a smart contract
tbr {tx hash} - remove a breakpoint on a transaction
bbr {height} - remove a breakpoint on a block
bl - list all breakpoints
si - step into
s - step over
so - step out
c - continue
estack - examine the EvaluationStack
astack - examine the AltStack
dis {offset} - disassemble the currently running contract

Settings

LocalDebugger/config.json contains the following settings to allow for preloading breakpoints non-interactively:

  • PreloadBlockBreakPoints - a list of block heights to set a breakpoint on
  • PreloadTxBreakPoints - a list of transaction hashes to set a breakpoint on
  • PreloadScriptBreakPoints - list of smart contract script hashes:offsets to set a breakpoint on
  • ActivateOnStart - enter debug mode immediately on loading the plugin

A block or transaction breakpoint will break at the first instruction of the first invocation in the block or transaction. If there is no invocation in the block or transaction, the breakpoint will not hit and the chain will continue to advance, looking for the next breakpoint.

About

A debugger plugin for neo-cli

License:MIT License


Languages

Language:C# 100.0%