Forum Stats

  • 3,824,920 Users
  • 2,260,440 Discussions
  • 7,896,348 Comments

Discussions

Oracle Debugger (DBMS_DEBUG_JDWP and DBMS_DEBUG) does not work with large Packages?

User_4AL7N
User_4AL7N Member Posts: 6 Green Ribbon

When debugging very large packages (> 4000 lines of code), the debugger is not able to step into them and instead hangs. The reason is that there are only partial debug informations aviable. Is there any workround for that issue (change size of packages is not an option!)?

Answers

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,571 Employee

    There's no limit.

    The reason is that there are only partial debug informations aviable.

    Not sure what this means.

    Are you getting error messages?

  • User_4AL7N
    User_4AL7N Member Posts: 6 Green Ribbon

    It is the following problem:

    key word "DEBUG SYMBOL TABLE"

    Error code: PLW-05015

    Description: implementation restriction - too many debug records

    Cause: The program is so large that it overflowed a compiler limit on the size of the debug symbol table. The module was compiled with partial debugging information.

    Action: Compile the module with PLSQL_DEBUG=FALSE, or split it into multiple modules

    But splitting packages is not an option for us. Too many dependencies.

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,571 Employee

    Cool, that's a new one for me.

    The only workaround's are

    • don't use the debugger, use logging tables or dbms_output
    • do exactly what you don't want to do, modularize further...break your code into smaller pieces. If you say you can't, and you have to have the debugger, it seems you've built something so large, it's not possible for you to support it any longer as a developer, and that's a bigger problem, right?
  • User_4AL7N
    User_4AL7N Member Posts: 6 Green Ribbon

    The limit is at about 2000 lines of code. Not really large in my opinion. But we have packages with more than 8000 lines of code.

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,571 Employee

    I don't think there's a relationship to 'lines of code'

    limit on the size of the debug symbol table

    I could create a 2500 line program of nothing but dbms_output and null; calls, and it would debug just fine, I'm guessing.

  • User_4AL7N
    User_4AL7N Member Posts: 6 Green Ribbon

    You are right, complexity is more important. But it is not possible to count the number of debug records. What would be very usefull is a indicator for packages which have too many debug records. For those, the compiler should only compile the package specification (if not too large) and the debugger should not try to step into the body (in order to see global variables in the debugger). In current implementation, debugger steps into the body and through initialization of global variables, but hangs when stepping into first function/procedure.

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,571 Employee

    I like the idea. I would submit an ER to the Database and PL/SQL teams through your My Oracle Support account portal.

  • User_4AL7N
    User_4AL7N Member Posts: 6 Green Ribbon

    Thanks a lot! Would be great to have such an improvement.

  • User_2DKLA
    User_2DKLA Member Posts: 41 Red Ribbon
    edited Jun 24, 2022 4:13PM

    What would be very usefull is a indicator for packages which have too many debug records. 

    Wouldn't the following query help?

    select owner, name, type, text
      from dba_errors
     where attribute = 'WARNING'
       and message_number = 5015
    

    My 2 cents...

    Regards,

    [EDIT:] That's assuming that WARNINGS were enabled at compile time, of course.