4

I have the following structure:

A package PCK_LANCAMENTOSERVICO within a procedure called P_Integra.

This procedure calls another procedure in another package PCK_LANCAMENTO called P_BeforeLancamento

The procedure P_BeforeLancamento calls another procedure called P_ProximoLanc in PCK_UTIL

I'm debugging the P_Integra(PCK_LANCAMENTOSERVICO) procedure. If a put a breakpoint in P_Integra procedure, this works ok. If a put a breakpoint in P_ProximoLanc procedure, this works fine. But if a put a brekpoint in P_BeforeLancamento, the debugger doesn't stop on breakpoint.

I added debug information in all packages. The package PCK_LANCAMENTOSERVICO has 500 lines. The package PCK_LANCAMENTO has 4000 lines and the package PCK_UTIL has 300 lines.

The debugger doesn't work in SQL Developer neither in PL/SQL Developer.

Is there a know issue about this? Size of package? Or another thing?

Thanks a lot

André

André Scaravelli
  • 251
  • 1
  • 4
  • 9

1 Answers1

4

You may have permission to execute the procedure, but not debug it. Look at the results of this query:

select *
from all_tab_privs
where privilege in ('EXECUTE', 'DEBUG')
    and table_name in ('PCK_LANCAMENTOSERVICO', 'PCK_LANCAMENTO', 'PCK_UTIL');

If DEBUG is missing, execute grant debug on PCK_LANCAMENTO to <your_user>;

Jon Heller
  • 34,999
  • 6
  • 74
  • 132
  • Was this the answer to your problem? I have the same issue but I have definitely granted debug etc. I can stop at a breakpoint in one stack-frame of the PL/SQL call but not a lower stack-frame. I have compiled both procs (headers and bodies) for debug. Kind of frustrating. – wmorrison365 Jan 29 '15 at 09:18
  • @wmorrison365 If you have privileges on all objects and all are compiled for debug then that should work. Does it fail to "step into", or does it fail to hit a breakpoint? It's sometimes possible to put a breakpoint on a line that's not really break-able; have you tried breaking on multiple lines? – Jon Heller Jan 29 '15 at 13:51
  • Hi Jon, thanks for your feedback. All relevant packages (header and bodies) are compiled for debug. I can break in a higher stack-frame but can't step into a lower frame (different package) and breakpoints in that lower frame are bypassed. Adding a `dbms_output.put_line('You are here '|| $$plsql_line);` in the area of the lower-stackframe's package breakpoint indicates I am at that line. Bizzarely, it will step through the header content but not the proc of interest. My SQLDeveloper may be out of date so going to upgrade (after just using good old debug-logging). – wmorrison365 Jan 30 '15 at 09:57
  • @wmorrison365 You may want to post your problem as a separate question. – Jon Heller Jan 31 '15 at 03:49