Debug window shows wrong sourceline

Jens Naumann

Member²
Hi, I'm using Version 12.02. A Problem using the debugger that exists long ago also in older versions. I hoped it's solved in version 12 but is not. Editing and compiling a package and setting a breakpoint. After the debugger starts the programm breaks on the desired line. Anything ok. Then edit the package again and debug newly. The debug breaks at the same line but it's marked in the editor one line above. This is much confusing. The only way I found to get this working is to close and reopen the test script. Can anyone help? Thanks
 
As a test I created the following procedure and set a breakpoint at the indicated line:

Code:
create or replace procedure breakpoint_test is
      v varchar2(100);
    begin
[*]   v := 'breakpoint here';
    end;

I compiled, right-clicked on the procedure, selected "Test", and started the debugger. It breaks at the indicated line. After completion I modified the procedure in the Program Window to:

Code:
create or replace procedure breakpoint_test is
      v varchar2(100);
    begin
      v := 'extra line';
[*]   v := 'breakpoint here';
    end;

After compilation the Test Window (which was still open) is immediately updated with the new procedure version. Starting the debugger again breaks at the correct line.

Can you verify this? Can you let me know if this works for you, or how it differs from your scenario?
 
Hi, sorry for the late answer. Because the described behaviour isn't reproducable in such tiny mode. I had to wait for an occurance in my daily work as You see in the image.



I opened the testscript and the package. Inserted the 3 lines at #126 und set the breakpoint at #127. The debugger breaks at #127 but the editor marks line #126. If I step forward the offset between debugger and editor keeps constant 1 line.

Best regards.

 
Last edited:
Thanks. I'm not aware of any debugger line bugs in 11.2. Do you have a reproducible case for this? If so, then to obtain some more diagnostic information, can you modify the shortcut and add the DebugSQL parameter? For example:

"C:\Program Files\PLSQL Developer 12\plsqldev.exe" DebugSQL

Reproduce the problem and send me the debug.txt file that is generated in the %APPDATA%\PLSQL Developer 12 directory (e.g. C:\Users\\AppData\Roaming\PLSQL Developer 12).
 
Hi, sorry for the late answer. This is because the administration did a long talk for permitting sending to You the wanted information. And, guess three times what the answer is. It's NO. This file contains too much product- and companyinformation. But the good news are, we also talked about the problem and I did some more test. The call stack in the debug window doesn't update the new row number. So the database say's 'break at 496' but the breakpoint is now on 497. So the wrong line is marked in the testwindow.
Best regards



 
I experience the same issue, most of the time, when debugging "huge" PL/SQL packages. Unfortunately, same as Jens, I cannot publish the code either (many table/code dependencies too).
But the issue persists. In fact, the issue is not only with breakpoints. After compiling previously debugged code (all tabs in Test Window kept open), simply stepping through lines will be off too (usually by 1 line), stopping even on "comment" and "non-executable" lines...
The workaround for me (aside from closing and reopening the Test Window) is to close the tabs of the code that was previously debugged and then recompiled.
For example, to debug package PKG, I create a test window, and step into package PKG. A new tab opens (in Test Window, with PKG's source code). Once I stop debugging and recompile PKG, I go back to Test Window and close the PKG tab, leaving only the main tab. When stepping into PKG, a new tab will open, with correct "stops". There's an (huge) annoyance there (Marco, please enhance): we can close the tabs only 1-by-1. A "Close All Tabs Except Main" (in Test Window) would be welcome.
 
Hi, it looks like that this request is buried. So I have to spend my days with the bug until my last day with plsql-dev?
Best regards
 
Back
Top