Monitoring HALCON programs with HALCON Spy🔗
HALCON Spy helps you to debug image processing programs realized with HALCON operators by monitoring calls to operators and displaying their input and output data in graphical or textual form. Further, it allows you to step through HALCON programs.
Important
Under Windows, HALCON Spy does only work in combination with a console application. That is, you cannot use it together with HDevelop or HDevelopEVO.
To activate HALCON Spy within a HALCON program, insert the line
set_spy('mode','on')
Tip
Alternatively, you can activate HALCON Spy for an already linked program by defining the environment variable HALCONSPY and setting it to any value.
To be informed about all operator calls and the names and values of input control parameters, specify the monitoring mode by calling the operator set_spy again with a pair of parameters.
Example
set_spy('operator','on')
set_spy('input_control','on')
The monitoring mode can also be specified via the environment variable HALCONSPY, using a colon to separate multiple options:
For more information about all debugging options, see the entry for set_spy in the HALCON operator reference.
HALCON Spy on multi-core or multi-processor hardware🔗
HALCON Spy cannot be used to debug multithreaded programs or programs using the automatic parallelization.
If you want to use HALCON Spy on a multi-core or multi-processor hardware, first switch off the automatic parallelization as described in Customizing the parallelization mechanisms.