Debugger hangs the entire application

Maxmix

Member³
Every time I insert "complex" Watch expression, on exit from cell in "Variable" column, debugger hangs and I cannot use PLSD anymore. I can kill the session from another instance of PLSD, but I cannot repeat test in the original Test Window, even Log off/Log on does not help (series of ora errors occur). I must create new Test Window, paste SQL in there, assign bind variables and so on.
The example of complex expression:
tgk_period_arr('BUD')('dedKK++')

P.S.
Multiple Connection = false
Multi Session = true
I usually debug procedures that do distributed queries.
 
Here is what I see at SQL Text tab, belonging to debug session before I kill it:
"declare
-- Probe 2.2 or later
handle sys.dbms_debug.program_info;
begin
handle.owner := :package_owner;
handle.name := :package_name;
if :inbody = 1 then
handle.namespace := sys.dbms_debug.namespace_pkg_body;
else
handle.namespace := sys.dbms_debug.namespace_pkgspec_or_toplevel;
end if;
:result := sys.dbms_debug.get_value(variable_name => :variable_name,
handle => handle,
scalar_value => :scalar_value,
format => :format);
end;
"

in hope it helps.
 
Hi

I have this issue also. I notice that when debugging code with complex multi-dimensional arrays the entire application will halt and you have to end the application and restart.

Pl/SQL Developer Version: 9.0.2.1621 86.75916
Oracle Version: 11.2.0.2.0

I have shown how to reproduce below:

1. Connect to Database
2. Compile the following procedure into a schema..

Code:
CREATE OR REPLACE PROCEDURE TEST_DEBUG IS

  -- A record type that is used to store the product specific data required by bill_calc.
  -- The record is populated in get_portfolio
  TYPE prod_rec IS RECORD
  (
   prod_id         NUMBER(10,0),
   description     VARCHAR2(240)
  );
  -- A nested table collection of the product records above.
  TYPE prod_set IS TABLE OF prod_rec;

  TYPE price_rec IS RECORD
  (
   price_id             NUMBER(5,0),
   version_id           NUMBER(3,0),
   amount               NUMBER(10,0),
   start_date           DATE,
   end_date             DATE
  );
  -- A nested table collection of the prices for any one product
  TYPE price_list IS TABLE OF price_rec;

  -- A nested table collection. It stores the sets of all prices for all products
  TYPE price_set IS TABLE OF price_list;

  CURSOR c_prods
  IS
    SELECT 123 prod_id, 'Product A' DESCRIPTION FROM DUAL
    UNION
    SELECT 321 prod_id, 'Product B' DESCRIPTION FROM DUAL;

  CURSOR c_prices_1
  IS
    SELECT 555 price_id, 1 version_id, 1000 amount, DATE '2010-09-01' start_date, DATE '2011-09-01' end_date FROM DUAL
    UNION
    SELECT 555 price_id, 2 version_id, 1050 amount, DATE '2011-09-01' start_date, DATE '2012-09-01' end_date FROM DUAL
    UNION
    SELECT 555 price_id, 3 version_id, 1150 amount, DATE '2012-09-01' start_date, NULL end_date FROM DUAL;

  CURSOR c_prices_2
  IS
    SELECT 777 price_id, 1 version_id, 670 amount, DATE '2010-09-01' start_date, DATE '2012-09-01' end_date FROM DUAL
    UNION
    SELECT 777 price_id, 2 version_id, 700 amount, DATE '2012-09-01' start_date, NULL end_date FROM DUAL;

  l_price_list price_list := NEW price_list();

  l_my_prods   prod_set := NEW prod_set();
  l_my_prices  price_set := NEW price_set();

  l_prod prod_rec;

  i  NUMBER;
  j  NUMBER;

BEGIN

-- some code just to populate the structures
  FOR prod_rec IN c_prods
  LOOP
    l_my_prods.EXTEND;
    l_my_prods(l_my_prods.LAST) := prod_rec;
  END LOOP;

  FOR price_list IN c_prices_1
  LOOP
    l_price_list.EXTEND;
    l_price_list(l_price_list.LAST) := price_list;
  END LOOP;
  l_my_prices.EXTEND;
  l_my_prices(1) := l_price_list;
  l_price_list.DELETE;

  FOR price_list IN c_prices_2
  LOOP
    l_price_list.EXTEND;
    l_price_list(l_price_list.LAST) := price_list;
  END LOOP;
  l_my_prices.EXTEND;
  l_my_prices(2) := l_price_list;
  -- end of population

  i := l_my_prods.FIRST;
  WHILE i IS NOT NULL
  LOOP
    DBMS_OUTPUT.PUT_LINE('Product: ' || i || ' - ' || l_my_prods(i).prod_id || ' - ' || l_my_prods(i).description);
    j := l_my_prices(i).FIRST;
    WHILE j IS NOT NULL
    LOOP
      DBMS_OUTPUT.PUT_LINE('  Product Price: ' ||  l_my_prices(i)(j).price_id || ' - ' || l_my_prices(i)(j).version_id
                              || ' - ' || l_my_prices(i)(j).amount || ' - ' || l_my_prices(i)(j).start_date);
      j := l_my_prices(i).NEXT(j);
    END LOOP;
    i := l_my_prods.NEXT(i);
  END LOOP;
END;
/

3. Use the Objects Browser to find the TEST_DEBUG proc, right click and add Debug Information
4. Right click again on TEST_DEBUG and select TEST
5. Execute the test script
6. Step into the Procedure
7. Set a break point on Line 90 (WHILE LOOP for iteration aroud prices)
8 Step to line 92
9. Using mouse, hover over the 'l_my_prods(i).prod_id' in line 88 (displays value correctly) as 123.
10. Now hover over 'l_my_prices(i)(j).price_id' on line 92.

The value is NOT shown.
The mouse icon turns to blue processing circle
User can no longer step through code
application has to be restarted.
This happens with EVERY multi-dimensional array.
It needs to be addressed. It is almost impossible to debug using PL/SQL Developer in applications that have complex data array structures.
 
Back
Top