-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1849 from multiversx/readme-install-pretty-printer
README: LLDB Pretty-Printer Script for Smart Contracts
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |