Basic Tutorial

The purpose of this section is to get you up and running with the Solidity debugger by walking through a very basic example. It is most suitable for beginners who are new to either Solidity or Sdbg.

To get started, open the Sdbg menu by clicking on its sidebar icon:


Create Debug Target from Example

Click the New Target button. A menu will appear that will allow you to create a new debug target. Type a name for your debug target, or just leave the default name provided. In the screenshots below, the default name is "MyContract3".

Select Create from example and click Next.

The menu will expand, allowing you to select an example project to start from.

Select Empty Contract.

Save Location is the filesystem path where the project will be created. If you do not supply a path, the suggested default will be used. In the screenshot below, that would be /Users/admin/SolidityProjects/MyContract3.

Click Create when you are done.


Starting the Debugger

Press the Debug button on the top toolbar. A menu will appear asking which Test you would like to debug. In this example there is only one Test, basicTest.t.sol. Select basicTest and the debugger will start.

Execution will begin and automatically break on line 4 where the test contract begins. This behavior is called Break-on-Entry. You can disable Break-on-Entry in the Project Settings window. You can now step through the execution of the contract.