From Flowcode Help
Jump to navigationJump to search

Code Profiling Introduction

Code profiling is a tool for identifying bugs within code and also alerting programmers of redundant code during simulation. Flowcode will highlight any icons which are 'hit', the frequency at which they are hit, and also notify which icons have never been hit.

Activating Code Profiling

Code profiling is activated from the top toolbar with the following icon CodeProfilingIcon.png Once activated, run the simulation as normal and you will see the glow appear around icons that have been hit. A cross will appear over any icons that have not been executed.

Using Code Profiling

Here we can see that the 'yes' branch of the switch statement has not been executed, and so the 'output 1 to B0' icon, has also not been executed. This could be due to a bug in the code, or as in this example, the switch simply hasn't been pressed yet. CodeProfilingEx1a.png

Here we can see that the switch has been pressed now. We know this as the cross has disappeared, and the icon has turned blue. The blue is a visual representation of how frequently this icon has been executed. Red icons are hit every time, and the more blue they turn, the less frequently they are executed.