...
You have to click Stop Simulation to stop the simulation before you can modify your program and/or hardware connections.
Debugging (Advanced)
More often than not, the code written by a programmer does not work as expected the very first time he/she runs it. We need to find out the logical flaws in our code and fix them before we are able to achieve full functionality. Figuring out flaws usually boil down to inspecting variable values at various points in our code, and comparing it with the expected values at those points based on the program logic and data inputs. The usual way Arduino programmers do it is by printing out the variable values to Serial]] ></ac:plain-text-link-body></ac:link> console. </span></p><p><span style="color: rgb(0,0,0);">Tinkercard allows for debugging without having to print the values you want to inspect through Serial. The example below shows debugging of the <ac:link><ri:page ri:content-title="Ultrasonic Distance Sensor" /></ac:link> example.</span></p><p><ac:image ac:height="400"><ri:attachment ri:filename="image2020-1-20_17-10-32.png" /></ac:image>\</p><ol><li>Press the Debugger button.</li><li>Select the line(s) where you want the execution is to be paused. Such a line where you wish to pause execution is called a <em>breakpoint</em>.</li><li>Click Start Simulation.</li><li>Hover over the variable values you want to inspect, and determine if the values are along the expected lines. If not, there is something wrong, and use your logic to determine what could be wrong.</li><li>You can press the Resume execution button to run until the next breakpoint.</li><li>You can also step line by line by clicking the Step Over Next Function button.</li></ol>