Skip to content

Commit

Permalink
Merge pull request #1849 from multiversx/readme-install-pretty-printer
Browse files Browse the repository at this point in the history
README: LLDB Pretty-Printer Script for Smart Contracts
  • Loading branch information
andreibancioiu authored Nov 8, 2024
2 parents cf67fa8 + d54645e commit 0a47a30
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tools/rust-debugger/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# Smart contract IDE debugging helper

A collection of scripts that help the IDE display relevant data, especially from managed types.

## LLDB Pretty-Printer Script for Smart Contracts

The LLDB pretty-printer script allows you to view managed types such as `BigUint` and `ManagedBuffer` in a readable format during debugging sessions.

### Prerequisites

- [**Visual Studio Code**](https://code.visualstudio.com/)
- [**CodeLLDB**](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) (LLDB Debugger extension for Visual Studio Code)


### Installation

First, download the [**MultiversX LLDB Pretty-Printer Script**](https://github.com/multiversx/mx-sdk-rs/blob/master/tools/rust-debugger/pretty-printers/multiversx_sc_lldb_pretty_printers.py) to a known directory on your system.

Then, adjust the `lldb.launch.initCommands` entry in your Visual Studio Code settings to import the pretty-printer script:


```json
{
"lldb.launch.initCommands": [
"command script import /path/to/pretty-printers/multiversx_sc_lldb_pretty_printers.py"
]
}
```

Once you have completed the steps above, you can start debugging your smart contract in Visual Studio Code. The pretty-printer script will automatically format managed types for you.

0 comments on commit 0a47a30

Please sign in to comment.