Cicode Programming Reference > Editing and Debugging Code > Using breakpoints

Using breakpoints

There are three ways for a processing thread to halt:

To debug a function, you need to first be able to stop it at a particular point in the code. You can place a breakpoint on any line in the source code functions. Breakpoints may be inserted or removed while editing or debugging without the need for them to be saved with the file.

For a detected hardware error to halt a function, you need to have either the Break on all hardware errors or Break on hardware errors in active thread option set (Debug menu - Options). When the break occurs, the default Cicode Editor will be launched (if it is not open already), with the correct code file, function, and break point line displayed. To launch the debugger in this case, you need to have the CitectSCADA will start debugger on hardware errors option set.