Thread: cannot get Debugger to install on 9.2 on Win7 x-64

cannot get Debugger to install on 9.2 on Win7 x-64

From
Tim Romano
Date:
I followed the steps to enable the debugger:

1. Modified the postgresql.conf file as directed shared_preload_libraries = '$libdir/plugin_debugger.dll' 
2. Stopped and restarted the database service. 
3. Ran CREATE EXTENSION pldbgapi in the database where I'm writing the functions. It reported success. 

But the debug option does show up in the Tools menu, nor does it appear in the treeview's context-menu when I right-click on a function-name.

What can I do to troubleshoot?

Thanks

Re: cannot get Debugger to install on 9.2 on Win7 x-64

From
Dave Page
Date:
On Wed, Feb 6, 2013 at 7:58 PM, Tim Romano <tim.romano888@gmail.com> wrote:
> I followed the steps to enable the debugger:
>
> 1. Modified the postgresql.conf file as directed shared_preload_libraries =
> '$libdir/plugin_debugger.dll'
> 2. Stopped and restarted the database service.
> 3. Ran CREATE EXTENSION pldbgapi in the database where I'm writing the
> functions. It reported success.
>
> But the debug option does show up in the Tools menu, nor does it appear in
> the treeview's context-menu when I right-click on a function-name.

I'm sure people are getting sick of me saying this here, but it worked
for me! Some things to check:

- Did you restart pgAdmin (or at least disconnect and reconnect the
server) after creating the extension?

- The debugger only supports pl/pgsql functions on PostgreSQL. Are you
right-clicking a function written in a different language?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: cannot get Debugger to install on 9.2 on Win7 x-64

From
Tim Romano
Date:
Thanks for taking time to reply, Dave. I have stopped and restarted the service several times, and have opened and closed pgAdmin several times.  It's definitely a PL/pgsql function. That's all I've been writing.  language plpgsql

Does the debugger definitely work on Windows 7  64-bit version?

When I look at the treeview, under Extensions, there are three:
adminpack
pldbgapi
plpgsql

pldbgapi has OID 17717, the schema is public, it is relocatable, it's version 1.0, and comment says server-side support for debugging PL/pgSQL functions.

It has these dependents:
Type: breakpoint
Type: frame
Type: proxyinfo
Type: targetinfo
Type: var

and 21 functions.

I'm thinking it is a GUI issue.  What does the UI look for when determining whether to display the Debugging option on Tools menu or on the treeview context menu?

Regards
Tim








On Thu, Feb 7, 2013 at 3:53 AM, Dave Page <dpage@pgadmin.org> wrote:
On Wed, Feb 6, 2013 at 7:58 PM, Tim Romano <tim.romano888@gmail.com> wrote:
> I followed the steps to enable the debugger:
>
> 1. Modified the postgresql.conf file as directed shared_preload_libraries =
> '$libdir/plugin_debugger.dll'
> 2. Stopped and restarted the database service.
> 3. Ran CREATE EXTENSION pldbgapi in the database where I'm writing the
> functions. It reported success.
>
> But the debug option does show up in the Tools menu, nor does it appear in
> the treeview's context-menu when I right-click on a function-name.

I'm sure people are getting sick of me saying this here, but it worked
for me! Some things to check:

- Did you restart pgAdmin (or at least disconnect and reconnect the
server) after creating the extension?

- The debugger only supports pl/pgsql functions on PostgreSQL. Are you
right-clicking a function written in a different language?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: cannot get Debugger to install on 9.2 on Win7 x-64

From
Dave Page
Date:
Hi

On Thu, Feb 7, 2013 at 10:38 AM, Tim Romano <tim.romano888@gmail.com> wrote:
> Thanks for taking time to reply, Dave. I have stopped and restarted the
> service several times, and have opened and closed pgAdmin several times.
> It's definitely a PL/pgsql function. That's all I've been writing.  language
> plpgsql
>
> Does the debugger definitely work on Windows 7  64-bit version?

Yes, that's what I'm testing on. It would be worth upgrading to 9.2.3
to ensure you have all the latest bug fixes though.

> I'm thinking it is a GUI issue.  What does the UI look for when determining
> whether to display the Debugging option on Tools menu or on the treeview
> context menu?

It's looking for a number of things (I'll omit some things that only
apply to Postgres Plus Advanced Server, if anyone is reading along in
the source code):

- You must be a superuser, or the owner of the function
- The function cannot be under the "Catalogs" node, it must be below "Schemas".
- The function language must be pl/pgsql
- The string "plugin_debugger" must appear in the output from "SHOW
shared_preload_libraries"
- The function "pldbg_get_target_info" must be listed in pg_proc
- The function "plpgsql_oid_debug" must be listed in pg_proc

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: cannot get Debugger to install on 9.2 on Win7 x-64

From
Tim Romano
Date:
Success.  

One must go into the configuration in pgAdmin (Tools menu, Server Configuration) and enable the shared_preload_libraries item by checking the checkbox next to it, save the config, and then stop/restart the database service.

Tim


On Thu, Feb 7, 2013 at 5:38 AM, Tim Romano <tim.romano888@gmail.com> wrote:
Thanks for taking time to reply, Dave. I have stopped and restarted the service several times, and have opened and closed pgAdmin several times.  It's definitely a PL/pgsql function. That's all I've been writing.  language plpgsql

Does the debugger definitely work on Windows 7  64-bit version?

When I look at the treeview, under Extensions, there are three:
adminpack
pldbgapi
plpgsql

pldbgapi has OID 17717, the schema is public, it is relocatable, it's version 1.0, and comment says server-side support for debugging PL/pgSQL functions.

It has these dependents:
Type: breakpoint
Type: frame
Type: proxyinfo
Type: targetinfo
Type: var

and 21 functions.

I'm thinking it is a GUI issue.  What does the UI look for when determining whether to display the Debugging option on Tools menu or on the treeview context menu?

Regards
Tim








On Thu, Feb 7, 2013 at 3:53 AM, Dave Page <dpage@pgadmin.org> wrote:
On Wed, Feb 6, 2013 at 7:58 PM, Tim Romano <tim.romano888@gmail.com> wrote:
> I followed the steps to enable the debugger:
>
> 1. Modified the postgresql.conf file as directed shared_preload_libraries =
> '$libdir/plugin_debugger.dll'
> 2. Stopped and restarted the database service.
> 3. Ran CREATE EXTENSION pldbgapi in the database where I'm writing the
> functions. It reported success.
>
> But the debug option does show up in the Tools menu, nor does it appear in
> the treeview's context-menu when I right-click on a function-name.

I'm sure people are getting sick of me saying this here, but it worked
for me! Some things to check:

- Did you restart pgAdmin (or at least disconnect and reconnect the
server) after creating the extension?

- The debugger only supports pl/pgsql functions on PostgreSQL. Are you
right-clicking a function written in a different language?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company