Content of PL/SQL string can not be seen in test window when string is too long

Claus Pedersen

Member³
I have a test script like the following:
Code:
BEGIN
  :str := NULL;
  FOR i IN 1..4095 LOOP
    :str := :str  || 'x ';
  END LOOP;
END;

The "str" variable must be of type PL/SQL String (not normal String, which has a limit of 4000 characters).

When running the script, the resulting string can not be seen in the variables pane (if the script does not give this error, try to increase the loop counter to 5000 or 6000). If opened in the large data editor, the correct data can be seen. Also if you navigate in the string in the pane using e.g. Ctrl-, you can see that it navigates to the next x, but still no data can be seen. If you mark something in the string (holding down the mouse button and drag to mark or using Shift and right or left arrow keys to mark), the data can be seen again. Also, if you delete some (invisible) characters from the string in the variable pane (so the number of characters goes below the "magic number"), the string it will appear again.

If the loop counter is changed to 4094, everything works. The magical number (on my machine) is 8188 bytes in the large data editor. When the string is longer, it becomes invisible.

The very strange thing is, that on another computer, the loop counter must be 3639 (!) for the string to disappear. I have not investigated this further.

It is only a visual bug, everything works otherwise, but it can be quite confusing that the data field seems to be empty when data is actually present, especially in a test script where a part of the test is to see if a string changes.

My version is 10.0.5
 
Update:
the max. number of characters of a string in the Value field of the test window is dependent of the physical display length of the string. In a variable width font like the one currently used in my test window, a W is much visually wider than for instance a . (dot)

So on my computer, the number of W's I can write in the Value field of the test window without the string becoming invisible is approx. 3000, whereas the number of dots I can write before the string disappears, is approx. 11000.
My system is set up to use the font Segoe UI, size 9 regular, in the grid window. If I change to a fixed width font like e.g. Courier New, the max. number of W's and dots are now the same, as they visually have the same width in the grid in the variable pane.

So maybe this is a clue for the developers to fix the problem?
 
Can this be fixed?

I am using the test window quite a lot to test (large) XML-strings, and it is quite annoying that the test data is invisible.
 
Not yet. The only workaround is to click on the [...] button to view the string in the large data editor.
 
Back
Top