Author Topic: How to Debug plug-in?  (Read 10497 times)

chiharu

  • Jr. Member
  • **
  • Posts: 2
How to Debug plug-in?
« on: July 24, 2007, 01:09:11 AM »
Hi,
I am whiting Custom Supervisor Policy plug-in on Linux just now.
How to Debug my plug-in ?

thank you.

anthony

  • Senior Software Engineer
  • Hero Member
  • *****
  • Posts: 183
Re: How to Debug plug-in?
« Reply #1 on: July 31, 2007, 08:53:54 AM »
Hey Chiharu-san,

     In terms of debugging, I typically modify my policy so that it prints out data to a file to test it.  Another method is to start up the supervisor in console mode.  This forces the supervisor to display to the command line. 

    Just do the following:

        Modify qb.conf and set supervisor_logfile = stdout

        open a command window and cd to the supervisor's location.

        cd C:\Program Files\pfx\qube\sbin
        cd /usr/local/pfx/qube/sbin

        supervisor --console

    That's it.  A simple Ctrl-C will stop the supervisor.  (Since the supervisor is normally setup with 2 licenses, you can run the supervisor on another machine for testing only)

        Anthony

chiharu

  • Jr. Member
  • **
  • Posts: 2
Re: How to Debug plug-in?
« Reply #2 on: August 01, 2007, 04:03:51 PM »
Oh, Nice! Thanks!!! :D