HALCON Spy helps you to debug image processing programs realized with HALCON operators by monitoring calls to HALCON operators and displaying their input and output data in graphical or textual form. Furthermore, it allows you to step through HALCON programs. Note that under Windows HALCON Spy does only work in combination with a console application, i.e., you can not use it together with HDevelop.
HALCON Spy is activated within a HALCON program by inserting the line
set_spy('mode','on')
Alternatively, you can activate HALCON Spy for an already linked program by defining the environment variable HALCONSPY (i.e., by setting it to any value). How to set environment variables is described in the Installation Guide.
You specify the monitoring mode by calling the operator set_spy again with a pair of parameters, for example
set_spy('operator','on') set_spy('input_control','on')
to be informed about all operator calls and the names and values of input control parameters. The monitoring mode can also be specified via the environment variable HALCONSPY, using a colon to separate multiple options:
operator=on:input_control=on
Please take a look at the entry for set_spy in the HALCON Reference Manuals for detailed information on all the debugging options.
Please note that 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, you must therefore first switch off the automatic parallelization as described in section “Customizing the Parallelization Mechanisms”.