> For the complete documentation index, see [llms.txt](https://docs.icb.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.icb.network/build-on-icb-network/hardhat/debugging-smart-contract-using-hardhat.md).

# Debugging smart contract using Hardhat?

&#x20;         In this guide, you'll explore how to debug smart contracts using Hardhat's built-in debugging tools.

## Learning Goals

&#x20;         By the end of this guide, you will be able to:

* Utilize `console.log` to output debugging information
* Identify common errors and understand how to resolve them
* Distinguish between errors originating from the contract and those caused by the test code

## Overview

&#x20;         Debugging smart contracts can be complex, particularly in the context of decentralized applications and blockchain systems. Fortunately, **Hardhat** offers robust tools that make the process more manageable.

&#x20;         In this tutorial, you'll dive into Hardhat's core debugging features and learn practical techniques for identifying and fixing common issues in your smart contracts.
