You can set breakpoints and log messages when an action on either a state or transition is executed.
You may need to examine the state chart variable values when debugging a state chart. State chart variables are defined in the state chart block in the Embed diagram or in the submachine state inside the state chart. The current value of a state chart variable is listed in the Data Browser for the State Chart Properties dialog and the Submachine Properties dialog.