Help > ContextCogs > Creating ContextCogs > Debugging a ContextCog

Debugging a ContextCog

You can debug your ContextCog in your chosen development environment. You must have Perceptive Enterprise Search installed on your development platform, or have a development environment that supports remote debugging. This tutorial assumes you have Perceptive Enterprise Search installed on your development platform.

Note: You should not debug on a production environment as it requires the Perceptive Enterprise Search web services to be stopped and then started in debugging mode. You should also prevent users from searching against the server while you are debugging to prevent breakpoints being inadvertently triggered.

To debug your context cog:

  1. Install the context cog using the steps outlined above.
  2. Stop the ISYSweb service by following these steps:
    1. Go to Control Panel\Administrative Tools\Services.
    2. Select the Perceptive Enterprise Search service.
    3. Click Stop.
  3. Configure your development environment to specify a hosting application as the debugging host. The required settings are:

    Host

    C:\Program Files\Perceptive Enterprise Search\ISYSweb.exe
    You may need to adjust this location to Perceptive Enterprise Search installation folder.

    Command Line

    /console /debug

  4. Start your application in debug mode; Perceptive Enterprise Search will start in a console. You should now be able to set breakpoints in your application. Set a breakpoint in your Process method.
  5. Open your website in a web browser and execute a search. If the Context Cog is correctly configured, your development environment should break into the Process method.