scxmlcc can provide information to [scxmlgui](https://github.com/fmorbini/scxmlgui/) so this tool can visualise the active states and transitions taken. This is enabled with the `--debug scxmlgui` option.
From the scxmlgui tool, open the state machine you want to debug. you can enable the 'SCXML execution listener' from the Tools menu. Then you can connect your state machine to scxmlgui with a command like this (for linux)
./my_machine 2> >(nc localhost 1234)
Where `my_machine` is your state machine and `1234` is the tcp port to use. This port must match the port chosen in scxmlgui. This command redirects stderr to the tcp port where scxmlgui listens.