diff --git a/arbitrum-docs/partials/_reference-third-party-rpc-endpoints-partial.mdx b/arbitrum-docs/partials/_reference-third-party-rpc-endpoints-partial.mdx
index d09d0866a..31ad216db 100644
--- a/arbitrum-docs/partials/_reference-third-party-rpc-endpoints-partial.mdx
+++ b/arbitrum-docs/partials/_reference-third-party-rpc-endpoints-partial.mdx
@@ -8,27 +8,28 @@ Complete [this form](@portalApplicationForm@) , if you'd like to see your projec
:::
-| Provider | Arb One? | Arb Nova? | Arb Sepolia? | Websocket? |
-| ------------------------------------------------------------------------------------ | -------- | --------- | ------------ | ---------- |
-| [1RPC](https://docs.1rpc.io/overview/supported-networks#arbitrum) | ✅ | | | |
-| [Alchemy](https://docs.alchemy.com/reference/arbitrum-api-quickstart) | ✅ | ✅ | ✅ | ✅ |
-| [Allnodes](https://arbitrum.publicnode.com) | ✅ | ✅ | | ✅ |
-| [Ankr](https://www.ankr.com/docs/rpc-service/chains/chains-list/#arbitrum) | ✅ | | | ✅ |
-| [Blast](https://blastapi.io/public-api/arbitrum) | ✅ | ✅ | | ✅ |
-| [BlockPi](https://docs.blockpi.io/documentations/api-reference/arbitrum) | ✅ | ✅ | | |
-| [BlockVision](https://dashboard.blockvision.org/connect) | ✅ | | | |
-| [Chainbase](https://docs.chainbase.com/docs/chain-api-overview#arbitrum-one) | ✅ | | | ✅ |
-| [Chainnodes](https://www.chainnodes.org/chains/arbitrum) | ✅ | | | |
-| [Chainstack](https://chainstack.com/build-better-with-arbitrum/) | ✅ | | | ✅ |
-| [DataHub](https://datahub.figment.io/) | ✅ | | | |
-| [DRPC](https://drpc.org/public-endpoints/arbitrum) | ✅ | ✅ | | ✅ |
-| [GetBlock](https://getblock.io/nodes/arb/) | ✅ | | | ✅ |
-| [Infura](https://docs.infura.io/infura/networks/arbitrum) | ✅ | | ✅ | ✅ |
-| [Lava](https://docs.lavanet.xyz/gateway-access) | ✅ | ✅ | | |
-| [Moralis](https://docs.moralis.io/reference/introduction) | ✅ | | | |
-| [Nirvana Labs](https://nirvanalabs.io) | ✅ | ✅ | ✅ | ✅ |
-| [NodeReal](https://nodereal.io/meganode/api-marketplace/arbitrum-nitro-rpc) | ✅ | ✅ | | |
-| [NOWNodes](https://nownodes.io/nodes/arbitrum-arb) | ✅ | | | |
-| [Pocket Network](https://docs.pokt.network/welcome-to-pokt-network/supported-chains) | ✅ | | | |
-| [Quicknode](https://www.quicknode.com/chains/arb) | ✅ | ✅ | ✅ | ✅ |
-| [Unifra](https://unifra.io/) | ✅ | | | |
+| Provider | Arb One? | Arb Nova? | Arb Sepolia? | Websocket? | Stylus Tracing? |
+| ------------------------------------------------------------------------------------ | -------- | --------- | ------------ | ---------- | ------------------------------ |
+| [1RPC](https://docs.1rpc.io/overview/supported-networks#arbitrum) | ✅ | | | | |
+| [Alchemy](https://docs.alchemy.com/reference/arbitrum-api-quickstart) | ✅ | ✅ | ✅ | ✅ | Available on paid plans |
+| [Allnodes](https://arbitrum.publicnode.com) | ✅ | ✅ | | ✅ | |
+| [Ankr](https://www.ankr.com/docs/rpc-service/chains/chains-list/#arbitrum) | ✅ | | | ✅ | Available on paid plans |
+| [Blast](https://blastapi.io/public-api/arbitrum) | ✅ | ✅ | | ✅ | |
+| [BlockPi](https://docs.blockpi.io/documentations/api-reference/arbitrum) | ✅ | ✅ | | | |
+| [BlockVision](https://dashboard.blockvision.org/connect) | ✅ | | | | |
+| [Chainbase](https://docs.chainbase.com/docs/chain-api-overview#arbitrum-one) | ✅ | | | ✅ | |
+| [Chainnodes](https://www.chainnodes.org/chains/arbitrum) | ✅ | | | | |
+| [Chainstack](https://chainstack.com/build-better-with-arbitrum/) | ✅ | | | ✅ | Available on paid plans |
+| [DataHub](https://datahub.figment.io/) | ✅ | | | | |
+| [DRPC](https://drpc.org/public-endpoints/arbitrum) | ✅ | ✅ | | ✅ | |
+| [GetBlock](https://getblock.io/nodes/arb/) | ✅ | | | ✅ | |
+| [Infura](https://docs.infura.io/infura/networks/arbitrum) | ✅ | | ✅ | ✅ | Enabled on request |
+| [Lava](https://docs.lavanet.xyz/gateway-access) | ✅ | ✅ | | | |
+| [Moralis](https://docs.moralis.io/reference/introduction) | ✅ | | | | |
+| [Nirvana Labs](https://nirvanalabs.io) | ✅ | ✅ | ✅ | ✅ | |
+| [NodeReal](https://nodereal.io/meganode/api-marketplace/arbitrum-nitro-rpc) | ✅ | ✅ | | | |
+| [NOWNodes](https://nownodes.io/nodes/arbitrum-arb) | ✅ | | | | |
+| [Pocket Network](https://docs.pokt.network/welcome-to-pokt-network/supported-chains) | ✅ | | | | |
+| [Quicknode](https://www.quicknode.com/chains/arb) | ✅ | ✅ | ✅ | ✅ | Testnet supported in free tier |
+| [Unifra](https://unifra.io/) | ✅ | | | | |
+| [Tenderly](https://tenderly.co/) | ✅ | ✅ | ✅ | ✅ | Testnet supported in free tier |
diff --git a/arbitrum-docs/stylus/how-tos/debugging-stylus-tx.mdx b/arbitrum-docs/stylus/how-tos/debugging-stylus-tx.mdx
index afb45ee79..914adf858 100644
--- a/arbitrum-docs/stylus/how-tos/debugging-stylus-tx.mdx
+++ b/arbitrum-docs/stylus/how-tos/debugging-stylus-tx.mdx
@@ -8,8 +8,6 @@ content_type: how-to
sidebar_position: 2
---
-import MacosVerifyTxIssueBannerPartial from '../../partials/_macos-verify-tx-issue-banner-partial.mdx';
-
Debugging smart contracts can be challenging, especially when dealing with complex transactions. The `cargo-stylus` crate simplifies the debugging process by allowing developers to replay Stylus transactions. This tool leverages GDB to provide an interactive debugging experience, enabling developers to set breakpoints, inspect state changes, and trace the execution flow step-by-step. This capability is crucial for identifying and resolving issues, ensuring that smart contracts function correctly and efficiently.
### Overview
@@ -17,36 +15,40 @@ Debugging smart contracts can be challenging, especially when dealing with compl
Cargo Stylus is a tool designed to simplify the development and debugging process for smart contracts written in Rust for the Stylus execution environment. One of its powerful features is the `cargo stylus` subcommand, which provides essential functionalities for developers:
1. **Trace transactions**: Perform trace calls against Stylus transactions using Ethereum nodes' `debug_traceTransaction` RPC. This feature enables developers to analyze the execution flow and state changes of their transactions in a detailed manner.
-2. **Debugging with GDB**: Replay and debug the execution of a Stylus transaction using the GNU Debugger (GDB). This allows developers to set breakpoints, inspect variables, and step through the transaction execution line by line, providing an in-depth understanding of the transaction's behavior.
+2. **Debugging with GDB or LLDB**: Replay and debug the execution of a Stylus transaction using a debugger. This allows developers to set breakpoints, inspect variables, and step through the transaction execution line by line, providing an in-depth understanding of the transaction's behavior.
### Replaying transactions
-
-
#### Requirements
- **Rust** (version 1.77 or higher)
- **Crate**: `cargo-stylus`
-- **GNU Debugger (GDB)**
+- **GNU Debugger (GDB)** (Linux) or **LLDB** (MacOS)
- **[Cast](https://book.getfoundry.sh/cast/)** (an Ethereum CLI tool)
-- **Local Arbitrum Sepolia node** with tracing endpoints enabled or a [local Stylus dev node](https://arbitrum-docs-ncyp5gty1-offchain-labs.vercel.app/run-arbitrum-node/run-local-dev-node)
+- **[Arbitrum RPC Provider](#rpc-endpoint-compatibility)** with tracing endpoints enabled or a [local Stylus dev node](https://docs.arbitrum.io/run-arbitrum-node/run-nitro-dev-node)
-`cargo stylus replay` allows users to debug the execution of a Stylus transaction using [GDB](https://sourceware.org/gdb/) against the Rust source code.
+`cargo stylus replay` allows users to debug the execution of a Stylus transaction using [GDB](https://sourceware.org/gdb/) or [LLDB](https://lldb.llvm.org/) against the Rust source code.
### Installation and setup
-1. **Install the required crates and GDB**: First, let's ensure that the following crates are installed:
+1. **Install the required crates and debugger**: First, let's ensure that the following crates are installed:
```sh
cargo install cargo-stylus
```
-Install GDB if it's not already installed:
+If on Linux, install GDB if it's not already installed:
```sh
sudo apt-get install gdb
```
+If on MacOS, install LLDB if it's not already installed:
+
+```sh
+xcode-select --install
+```
+
2. **Deploy your Stylus contract**: For this guide, we demonstrate how to debug the execution of the `increment()` method in the [stylus-hello-world](https://github.com/OffchainLabs/stylus-hello-world) smart contract. In Rust, it looks something like this, within `src/lib.rs`:
```sh
@@ -97,7 +99,7 @@ And send a transaction using `Cast`:
cast send --rpc-url=$RPC_URL --private-key=$PRIV_KEY $ADDR "increment()"
```
-4. **Replay the transaction with GDB**: Now, we can replay the transaction with cargo stylus and GDB to inspect each step of it against our source code. Make sure GDB is installed and that you are on a Linux, x86 system.
+4. **Replay the transaction with the debugger**: Now, we can replay the transaction with cargo stylus and the debugger to inspect each step of it against our source code. Make sure GDB is installed and that you are on a Linux, x86 system.
Also, you should set the transaction hash as an environment variable:
```sh
@@ -107,10 +109,20 @@ export TX_HASH=0x18b241841fa0a59e02d3c6d693750ff0080ad792204aac7e5d4ce9e20c46683
And replay the transaction:
```sh
-cargo stylus replay --tx=$TX_HASH --endpoint=$RPC_URL
+cargo stylus replay --tx=$TX_HASH --endpoint=$RPC_URL --use-native-tracer
+```
+
+Options:
+
+```sh
+--tx: Specifies the transaction hash to replay.
+--endpoint: Specifies the RPC endpoint for fetching transaction data.
+--use-native-tracer: Uses the native Stylus tracer instead of the default JS tracer. The native tracer has broader support from RPC providers.
```
-GDB will load and set a breakpoint automatically at the `user_entrypoint` internal Stylus function.
+**Note:** The `--use-native-tracer` flag uses `stylusTracer` instead of `jsTracer`, which is required for tracing Stylus transactions on most RPC providers. See more details [below](#rpc-endpoint-compatibility).
+
+The debugger will load and set a breakpoint automatically at the `user_entrypoint` internal Stylus function. While the examples below showcase GDB commands, you can find the LLDB equivalents [here](https://lldb.llvm.org/use/map.html).
```sh
[Detaching after vfork from child process 370003]
@@ -120,7 +132,7 @@ Thread 1 "cargo-stylus" hit Breakpoint 1, stylus_hello_world::user_entrypoint (l
(gdb)
```
-5. **Debugging with GDB**: Now, set a breakpoint at the `increment()` method:
+5. **Debugging**: Now, set a breakpoint at the `increment()` method:
```sh
(gdb) b stylus_hello_world::Counter::increment
@@ -146,7 +158,7 @@ Thread 1 "cargo-stylus" hit Breakpoint 2, stylus_hello_world::Counter::increment
For traditional tracing, `cargo stylus` supports calls to `debug_traceTransaction`. To trace a transaction, you can use the following command:
```sh
-cargo stylus trace [OPTIONS] --tx
+cargo stylus trace [OPTIONS] --tx --use-native-tracer
```
Options:
@@ -157,12 +169,13 @@ Options:
-p, --project Project path [default: .]
-h, --help Print help
-V, --version Print version
+ --use-native-tracer Uses the native Stylus tracer instead of the default JS tracer. The native tracer has broader support from RPC providers.
```
Run the following command to obtain a trace output:
```sh
-cargo stylus trace --tx=$TX_HASH --endpoint=$RPC_URL
+cargo stylus trace --tx=$TX_HASH --endpoint=$RPC_URL --use-native-tracer
```
This will produce a trace of the functions called and [ink](https://docs.arbitrum.io/stylus/concepts/stylus-gas#ink-and-gas) left along each method:
@@ -170,3 +183,10 @@ This will produce a trace of the functions called and [ink](https://docs.arbitru
```sh
[{"args":[0,0,0,4],"endInk":846200000,"name":"user_entrypoint","outs":[],"startInk":846200000},{"args":[],"endInk":846167558,"name":"msg_reentrant","outs":[0,0,0,0],"startInk":846175958},{"args":[],"endInk":846047922,"name":"read_args","outs":[208,157,224,138],"startInk":846061362},{"args":[],"endInk":845914924,"name":"msg_value","outs":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"startInk":845928364},{"args":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"endInk":227196069,"name":"storage_load_bytes32","outs":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"startInk":844944549},{"args":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],"endInk":226716083,"name":"storage_cache_bytes32","outs":[],"startInk":226734563},{"args":[0],"endInk":226418732,"name":"storage_flush_cache","outs":[],"startInk":226486805},{"args":[],"endInk":226362319,"name":"write_result","outs":[],"startInk":226403481},{"args":[],"endInk":846200000,"name":"user_returned","outs":[0,0,0,0],"startInk":846200000}]
```
+
+### RPC endpoint compatibility
+
+Both `cargo stylus trace` and `cargo stylus replay` require an RPC endpoint that supports `debug_traceTransaction`.
+By default, the `jsTracer` type is used, which is not supported by most RPC providers. If the `--use-native-tracer` flag is used, the `stylusTracer` type is used, which is supported by many RPC providers.
+Both `jsTracer` and `stylusTracer` are available on local nodes, but `stylusTracer` is more efficient.
+See this [list of RPC providers](https://docs.arbitrum.io/for-devs/dev-tools-and-resources/chain-info#third-party-rpc-providers) for tracing support.