Skip to content

Latest commit

 

History

History
139 lines (104 loc) · 7.86 KB

readme.md

File metadata and controls

139 lines (104 loc) · 7.86 KB

Neo Smart Contract Debugger

Note, the Neo Smart Contract Debugger DOES NOT use the same versioning scheme as the core Neo platform. For example, Debugger v3.4 is for Neo v3.3. Reasoning for the debugger versioning strategy are explained here

The Neo Smart Contract Debugger enables Neo developers to debug their smart contracts in Visual Studio and Visual Studio Code. It is built on the same virtual machine as the core Neo project to ensure maximum compatibility between the debugger and how contracts will execute in production.

Neo supports writing smart contracts in a variety of languages. However, the debugger needs the smart contract complier to emit additional information the debugger uses to map Neo Virtual Machine instructions back to source code. The debug information format is fully documented. This format is supported by a variety of Neo smart contract compilers including

Versioning Strategy

As of March 2022, the Neo Smart Contract Debugger project has adopted VS Code recommended guidance for version numbers. This will allow the VS Code Marketplace to offer production and pre-release versions of this extension. Developers will be able to choose which version to install and VS Code will automatically keep the extension up to date.

Going forward, the minor version of this extension will be even for production releases and odd for preview releases. The first production release under this new versioning strategy will ve v3.2. The first pre-release of this extension will be v3.3.

Note, this project uses NerdBank Git Versioning to manage release version numbers. As such, patch versions of public releases will typically not be sequential.

Installation

The Neo Smart Contract Debugger requires a .NET runtime to be installed. The version of .NET Core needed depends on the version of the Neo Smart Contract Debugger.

Neo Smart Contract Debugger Version .NET Core Version
v3.1 and later v6.0 (for Neo N3 contracts)
v3.1 (for Neo Legacy Contracts)
v3.0 v5.0 (for Neo N3 contracts)
v3.1 (for Neo Legacy Contracts)
v2.0 (unsupported) v5.0 (for Neo N3 contracts)
v3.1 (for Neo Legacy Contracts)
v1.0 v3.1
v0.9 (unsupported) v3.0
v0.5 (unsupported) v2.2

Visual Studio Code

The Neo Smart Contract Debugger for Visual Studio Code can be installed via the Visual Studio Code Marketplace. It can be installed by itself or as part of the Neo Blockchain Toolkit.

The Neo Smart Contract Debugger requires a .NET runtime to be installed. The version of .NET Core needed depends on the version of the Neo Smart Contract Debugger.

As of version 2.0, the Neo Smart Contract Debugger for Visal Studio Code supports both Neo N3 and Neo Legacy.

Ubuntu Installation

Using the checkpoint functionality on Ubuntu requires installing libsnappy-dev and libc6-dev via apt-get.

> sudo apt install libsnappy-dev libc6-dev -y

MacOS Installation

Using the checkpoint functionality on MacOS requires installing rocksdb via Homebrew

> brew install rocksdb

Install Preview Releases

The Neo Smart Contract Debugger has a public build server. You can install preview builds of the debugger by navigating to the build you wish to install, pressing the "Artifacts" button in the upper right hand corner and downloading the VSIX-package artifact. The artifact is a zip file containing the debugger VSIX file, which can be installed manually. For more information on installing VSIX extensions in VSCode, please see the official VSCode docs.

Visual Studio

The Neo Smart Contract Debugger for Visual Studio is currently in preview. To install it, download a recent release of neodebug-vs-{version}.vsix from the GitHub release page to your local machine then double click on the file.

The Neo Smart Contract Debugger for Visual Studio requires Visual Studio 2019 Community, Professional or Enterprise. It has not been tested with Visual Studio 2022 preview releases. Additionally, The Neo Smart Contract Debugger for Visual Studio requires .NET v5.0 in order to debug Neo N3 contracts as described above. Debugging Neo Legacy contracts is not supported in the Neo Smart Contract Debugger for Visual Studio.

Additional documentation on using The Neo Smart Contract Debugger for Visual Studio is available.

A Message from the Engineer

Thanks for checking out the Neo Smart Contract Debugger! I am eager to hear your opinion of the product.

If you like the debugger, please let me know on Twitter, email or the Neo Discord server.

If there are things about the debugger you don't like, please file issues in our GitHub repo. You can hit me up on Twitter, Discord or email as well, but GitHub issues are how we track bugs and new features. Don't be shy - file an issue if there is anything you'd like to see changed in the product.

Most software is built by teams of people. However, the Neo Smart Contract Debugger so far has been a solo effort. I'm looking forward to having other folks contribute in the future, but so far it's just been me. That means that the debugger has been designed around my experiences and my perspective. I can't help it, my perspective is the only one I have! :) So while I find the debugger intuitive, I realize that you may not feel the same. Please let me know if this is the case! I didn't build the Neo Smart Contract Debugger for me, I built it for the Neo developer community at large. So if there are changes we can make to make it more accessible, intuitive, easier to use or just flat-out better - I want to hear about them.

Thanks again for checking out the Neo Smart Contract Debugger. I look forward to hearing from you.

- Harry Pierson (aka DevHawk), Chief Architect ngd enterprise