This discussion is archived
1 2 Previous Next 15 Replies Latest reply: Feb 6, 2006 9:05 PM by 3039 RSS

PL/SQL Debugging does not stop on breakpoint

24208 Oracle ACE
Currently Being Moderated
I am trying to debug a very simple stored procedure using 10.1.3 EA1.

PL/SQL Package:
create or replace package hr.emp_test as
  function get_emp_info return sys_refcursor;
end;
PL/SQL Package Body:
create or replace package body hr.emp_test as
  function get_emp_info return sys_refcursor is
    l_cursor sys_refcursor;
  begin
    open l_cursor for
    select   employee_id "Employee #",
             last_name || ', ' || first_name "Name",
             job_id "Job",
             to_char(hire_date,'DD-MON-YYYY') "Hire Date"
    from     hr.employees
    order by last_name, first_name;

    return l_cursor;
  end;
end;
I have set a breakpoint on the "open l_cursor for" source line and when I right-click on the "EMP_TEST BODY" element in the connection node and select debug I get this output:
Connecting to the database lt10gr2_hr.
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '169.254.25.129', '3779' )
Debugger accepted connection from database on port 3779.
Process exited.
Disconnecting from the database lt10gr2_hr.
Debugger disconnected from database.
I have ensured that the code has been compiled with debug information. The function can be debugged using Allround Automations PL/SQL developer with no problems. Is there some voodoo that needs to happen to get JDeveloper to stop on the breakpoint?

TIA,

Mark
  • 1. Re: PL/SQL Debugging does not stop on breakpoint
    24208 Oracle ACE
    Currently Being Moderated
    For what it is worth...

    I downloaded and installed JDeveloper 10.1.2 and debugging works as expected using 10.1.2... Is there some configuration difference or what?

    - Mark
  • 2. Re: PL/SQL Debugging does not stop on breakpoint
    lstsaur Newbie
    Currently Being Moderated
    Mark,
    The following message should be displayed between the other two Executing PL/SQL: statements in the message log when your debugger connected to DB:
    Executing PL/SQL: ALTER SESSION SET PLSQL_COMPILER_FLAGS=INTERPRETED.

    It is missing when you used 10.1.3 EA1 JDeveloper and that's the problem.
  • 3. Re: PL/SQL Debugging does not stop on breakpoint
    24208 Oracle ACE
    Currently Being Moderated
    Hi Istsaur,

    Thanks for the information. Maybe I should wait until 10.1.3 goes to production before I fiddle with it again.

    - Mark
  • 4. Re: PL/SQL Debugging does not stop on breakpoint
    24208 Oracle ACE
    Currently Being Moderated
    A bit more follow-up...

    When I debug the function from 10.1.2 this is the output in the Debugging message window:
    Connecting to the database lt10gr2_hr.
    Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
    Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '169.254.25.129', '1235' )
    Debugger accepted connection from database on port 1235.
    Debugger disconnected from database.
    Process exited.
    Disconnecting from the database lt10gr2_hr.
    This output is missing in the debugging message window:
    PL/SQL: ALTER SESSION SET PLSQL_COMPILER_FLAGS=INTERPRETED.
    So, I am wondering if it is really required - it is not there for 10.1.2 and debugging is working fine in that version. Is there some configuration item, etc. that I may have missed?

    - Mark
  • 5. Re: PL/SQL Debugging does not stop on breakpoint
    lstsaur Newbie
    Currently Being Moderated
    Mark,
    It's required that PL/SQL code must be compiled in INTERPRETED mode. If your PL/SQL code is stored on the 9i DB, then you will see the PL/SQL: ALTER SESSION SET PLSQL_COMPILER_FLAGS=INTERPRETED is displayed in the message log window. However, since you are running against 10g DB, this message has been deprecated from the JDeveloper. As you said that you could debug just fine using 10.1.2 version, then all I can suggest you to do is the following when you are using 10.1.3 version.

    The breakpoint must be set on an executable line of code. If the debugger does not stop, the breakpoint may have not been set on an executable line of code (verify that the breakpoint was verified). Also, verify that the debugging PL/SQL prerequisites were met. In particular, make sure that the PL/SQL program is compiled in INTERPRETED mode. Good luck.
  • 6. Re: PL/SQL Debugging does not stop on breakpoint
    24208 Oracle ACE
    Currently Being Moderated
    Hi Istsaur,

    The database is 10g Release 2 (10.2.0.1.0). The package and package body have both been compiled with the compiler flags set to 'interpreted' and 'debug' and, as I say, JDeveloper 10.1.2 and PL/SQL Developer both work with no problems at all. I am thinking there is something that I have not set correctly in JDeveloper 10.1.3 or that something is just plain not working. I have tried from multiple machines and it just blasts right through the function. I turned on database tracing and it actually does call the function, just no breakpoint/step through capabilities...

    Thanks,

    Mark
  • 7. Re: PL/SQL Debugging does not stop on breakpoint
    24208 Oracle ACE
    Currently Being Moderated
    And just a bit more information...

    It seems that the problem only occurs on code that resides in a package body (which all of mine does). Stand-alone procedures and functions appear to be able to be "stepped-through"...

    Here's the plsql* settings on the database:
    SQL> show parameter plsql

    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------
    plsql_ccflags                        string
    plsql_code_type                      string      INTERPRETED
    plsql_compiler_flags                 string      INTERPRETED, DEBUG
    plsql_debug                          boolean     TRUE
    plsql_native_library_dir             string
    plsql_native_library_subdir_count    integer     0
    plsql_optimize_level                 integer     2
    plsql_v2_compatibility               boolean     FALSE
    plsql_warnings                       string      DISABLE:ALL
    - Mark
  • 8. Re: PL/SQL Debugging does not stop on breakpoint
    108146 Newbie
    Currently Being Moderated
    Hello,
    I'm experiencing similar problem: while trying to debug packages (using JPDA listener dbms_debug.connect) i got 'unable to find source file' dialog with missing filename 'PACKAGE_NAME.pls' - choosing any of 4 options does not help..
    I tried to create such file and put it on the projects path with no difference.

    Packages are interpreted, compiled with debug info and debugger accepts connection obviously.
    Same technique worked rather well with previous versions.
    Any hints?
    Cheers,
    Chris
  • 9. Re: PL/SQL Debugging does not stop on breakpoint
    108146 Newbie
    Currently Being Moderated
    Follow up with log snippet:

    Debugger accepted connection from remote process on port 5003.
    Unable to set breakpoint (somepath\package_name.pls 1922), unable to resolve Java package.
    ....
    repeated for all breakpoints.
    They are on the executable lines..
    Cheers,
    Chris
  • 10. Re: PL/SQL Debugging does not stop on breakpoint
    108146 Newbie
    Currently Being Moderated
    and obviously i meant DBMS_DEBUG_JDWP.CONNECT_TCP and not dbms_debug.connect..
  • 11. Re: PL/SQL Debugging does not stop on breakpoint
    24208 Oracle ACE
    Currently Being Moderated
    Would like to get some sort of feedback as to whether this is a known issue etc.
  • 12. Re: PL/SQL Debugging does not stop on breakpoint
    3039 Newbie
    Currently Being Moderated
    Would like to get some sort of feedback as to whether
    this is a known issue etc.
    Mark,

    This is now a known issue. It [bug 4630332] will be fixed in the 10.1.3 production release. For now, breakpoints in package bodies don't work.

    - Rob
  • 13. Re: PL/SQL Debugging does not stop on breakpoint
    24208 Oracle ACE
    Currently Being Moderated
    Hi Rob,

    Thanks very much for the response. I really appreciate it. I'll look for this to be in the production release!

    - Mark
  • 14. Re: PL/SQL Debugging does not stop on breakpoint
    470439 Newbie
    Currently Being Moderated
    My understanding is that in order to do debugging you must be able to set at least the initial breakpoint in the procedure you want to debug so that the debugger knows where to start from. So does the fact that you cant set a breakpoint mean that effectively u cannot do any remote debugging on packaged procedures ?

    If the answer to this is yes:
    1. Is there a workaround ?
    2. Is there an older version of JDeveloper is which this problem does not occur ?

    Thanks
1 2 Previous Next