Thread: Debugging grayed out even pldebugger is installed in postgres

Debugging grayed out even pldebugger is installed in postgres

From
Petr Vodicka
Date:
Hello,

I don't know why, but I am unable to use debugging feature in
pgAdminIII. Debugging selection in menu is still greyed out.

My environment is:

Linux Fedora 9, Postgres 8.4.0, PLpgSQL Debugger (latest CVS - version 1.11)
pgAdminIII 1.10.0 - Windows version


Debugger is installed in PostgreSQL, library plugin_debugger.so is
loaded and pldbgapi.sql script was used to create debug functions in
desired database. If I open database in PgAdminIII and look into
Funcions, debugging functions like ladbg_get_target_info or
pldbg_set_brakepoint are present and it looks that they are working,
because I am able to call them in SQL. But still debugging is not
available from menu. No debugging in context menu and debugging in
main menu is still greyed out.

I thought that there could be something wrong in so recent versions,
so I tried to compile PostgreSQL 8.3.7 from source with PlpgSQL 0.93,
but still no luck. Still no debugging in pgAdminIII.


Thanks,
Petr


Re: Debugging grayed out even pldebugger is installed in postgres

From
Dave Page
Date:
On Mon, Aug 3, 2009 at 9:35 AM, Petr Vodicka<vodicka.petr@email.cz> wrote:
> Hello,
>
> I don't know why, but I am unable to use debugging feature in
> pgAdminIII. Debugging selection in menu is still greyed out.

Have you selected a pl/pgsql function in the treeview? The option will
remain greyed out until you select somethign that can be debugged.


-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re: Debugging grayed out even pldebugger is installed in postgres

From
Dave Page
Date:
Please keep messages on the mailing list.

On Mon, Aug 3, 2009 at 10:38 AM, Petr Vodicka<vodicka.petr@email.cz> wrote:
> Yes, I did. I have few my own pl/pgsql function in my database and
> some other from installed Pg::snaphost. And if I select any of these
> functions, still no debug.

A few things to check:

Are the functions owned by your user account? (or are you a superuser?).

Do any of the debug options appear if you right-click the function?

Are the debug API functions installed in the same database as the
functions you want to debug? Having them in the maintenance database
is not enough.

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re: Debugging grayed out even pldebugger is installed in postgres

From
Dave Page
Date:
Again: Please keep messages on the mailing list.

On Mon, Aug 3, 2009 at 10:54 AM, Petr Vodicka<vodicka.petr@email.cz> wrote:
> 2009/8/3 Dave Page <dpage@pgadmin.org>:
>> Please keep messages on the mailing list.
>>
>> On Mon, Aug 3, 2009 at 10:38 AM, Petr Vodicka<vodicka.petr@email.cz> wrote:
>>> Yes, I did. I have few my own pl/pgsql function in my database and
>>> some other from installed Pg::snaphost. And if I select any of these
>>> functions, still no debug.
>>
>> A few things to check:
>>
>> Are the functions owned by your user account? (or are you a superuser?).
> Debug functions are owned by postgres, my functions are owned by my
> user account and I am superuser.
>
>>
>> Do any of the debug options appear if you right-click the function?
> No.
>
>>
>> Are the debug API functions installed in the same database as the
>> functions you want to debug? Having them in the maintenance database
>> is not enough.
> Yes, they are. And in the maintenance database (postgres) too.

What does the SQL query:

show shared_preload_libraries;

return?


-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re: Debugging grayed out even pldebugger is installed in postgres

From
Dave Page
Date:
Please keep the thread on the mailing list or I will have to stop
replying. I do not provide private support.

On Mon, Aug 3, 2009 at 12:49 PM, Petr Vodicka<vodicka.petr@email.cz> wrote:

>> What does the SQL query:
>>
>> show shared_preload_libraries;
>>
>> return?
>>
> Weird, only one empty row. So I tried to load library manually with
> LOAD '$libdir/plugins/plugin_debugger.so';. After that LOAD returned,
> so It looks like everything is ok, but still only one empty row returned
> if I enter show shared_preload_libraries; command.
>
> I have local_preload_libraries = 'libdir/plugins/plugin_debugger.so' parameter
> in my postgresql.conf, so I think, that it shoul be loaded after postgresql
> start. But somethink is probably wrong...
>

That should be:

shared_preload_libraries = '$libdir/plugins/plugin_debugger.so'


-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re: Debugging grayed out even pldebugger is installed in postgres

From
Petr Vodicka
Date:
2009/8/3 Dave Page <dpage@pgadmin.org>:
> Please keep the thread on the mailing list or I will have to stop
> replying. I do not provide private support.
I am really sorry, I didn't want to send private messages.

>
> On Mon, Aug 3, 2009 at 12:49 PM, Petr Vodicka<vodicka.petr@email.cz> wrote:
>
>>> What does the SQL query:
>>>
>>> show shared_preload_libraries;
>>>
>>> return?
>>>
>> Weird, only one empty row. So I tried to load library manually with
>> LOAD '$libdir/plugins/plugin_debugger.so';. After that LOAD returned,
>> so It looks like everything is ok, but still only one empty row returned
>> if I enter show shared_preload_libraries; command.
>>
>> I have local_preload_libraries = 'libdir/plugins/plugin_debugger.so' parameter
>> in my postgresql.conf, so I think, that it shoul be loaded after postgresql
>> start. But somethink is probably wrong...
>>
>
> That should be:
>
> shared_preload_libraries = '$libdir/plugins/plugin_debugger.so'
>

That was the problem. Now "show shared_preload_libraries;" command returns:
     shared_preload_libraries
------------------------------------$libdir/plugins/plugin_debugger.so
(1 row)

and debugging in pgAdminIII is working.


Thank you for your help. I would not be able to make it working without you.

Have a nice day,
Petr


Re: Debugging grayed out even pldebugger is installed in postgres

From
Dave Page
Date:
On Mon, Aug 3, 2009 at 1:47 PM, Petr Vodicka<vodicka.petr@email.cz> wrote:

>> That should be:
>>
>> shared_preload_libraries = '$libdir/plugins/plugin_debugger.so'
>>
>
> That was the problem. Now "show shared_preload_libraries;" command returns:
>
>      shared_preload_libraries
> ------------------------------------
>  $libdir/plugins/plugin_debugger.so
> (1 row)
>
> and debugging in pgAdminIII is working.
>
>
> Thank you for your help. I would not be able to make it working without you.

You're welcome - glad it's working now.


--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com