Test Window shows old procedure / function Code after recompiling

WSW-DBA

Member
Hello,

I am experiencing an issue with PL/SQL Developer 16.0.3 where the updated code of a procedure or function is not displayed after recompilation and adding debug information. Here are the steps I follow:
[

1. I compile my procedure/function

2. I generate a test script to test the procedure/function.

3. I make changes to the procedure/function and recompile it again with debug information.

4. I run the test script again

Despite these steps, the test script does not reflect the updated code. It seems to be showing the old version of the code.
If I close the test window and generate a new test script all is fine.
.

Could you please provide guidance on how to ensure that the updated code is correctly displayed in the test script after recompilation?

Thank you for your assistance.

Best regurds
WSW-DBA
 
I tried the following scenario, which seems to work fine:

1. Create a new Program Window with the following code:

Code:
create or replace function debug_test return varchar2 is
begin
  return('Hello World');
end debug_test;

2. Execute the Program Window to compile the function.

3. Right-click on the function and select "Test" from the popup menu.

4. Step through the code. The line "return('Hello World')" is displayed.

5. Switch back to the Program Window and change the text to "return('Changed')".

6. Execute the Program Window to compile the changed function.

7. Switch back to the Test Window and start the debugger again. The line with "return('Changed')" is now correctly displayed.

Can you try this same scenario?
 
I don't think he is referring to the output of the function, but to the new code being executed.
If you right-click anywhere in the tab with the (old) code, you can close this page. When you execute the next step, the code will be reloaded and the new code will be displayed.
 
I don't think he is referring to the output of the function, but to the new code being executed.

That is what I was referring to as well. In the scenario above the source line "return('Hello World')" is changed to "return('Changed')". The updated source line is displayed correctly in the debugger in step 7.
 
Hello Marco Kalter,

Thank you for your response. I tried the scenario you described.

In my case, unfortunately, the program window did not switch. I tried adding the debug information again. Unfortunately, this does not change anything.

Back to my original observations: The modified code was executed correctly, but the changed/added lines of code were not displayed correctly.
 
I'm curious about your workflow. You edit your source file in a program window, but you can't see the change you just made? I don't understand. Or are you saying you made the change in another editor such as Notepad++ and the program window is not automatically refreshing?
 
Hello William,
1. I edited my source in a command window as a set of procedures,
2. I closed all open windows in pl sql developer except the command window containing my Source and the test-Window containig the function call with parameter values.
3. I execute the script in my command window to create or replace the procedure/function after that I switch to the Test Window and execute the test procedure again step by step. When entering the procedure the old code without the changes is shown.
The new code seems to be executed correctly within the changes. But the steps are not showing the new code.

Kind regardds
WSW-DBA
 
I still think you should close the tab in the test-window (as described above) containing the code you are testing, that has been recompiled.
 
Editing the procedure in broader sense might include changes to api (renaming of parameter, complete new parameter and so on). To reflect such changes - the test window should completely be reloaded discarding non present parameters and adding new parameters. As of know - i don't think, such functionality is implemented in plsql developer, so, from my point of view - it is a preferrable way - close the test tab and open it again after editing.

best regards

Maxim
 
WSW-DBA said:
Hello William,
1. I edited my source in a command window as a set of procedures,
2. I closed all open windows in pl sql developer except the command window containing my Source and the test-Window containig the function call with parameter values.
3. I execute the script in my command window to create or replace the procedure/function after that I switch to the Test Window and execute the test procedure again step by step. When entering the procedure the old code without the changes is shown.
The new code seems to be executed correctly within the changes. But the steps are not showing the new code.

It sounds as though compiling your procedures in the Command window has failed somehow. If you view the database source, is the new version or the old version in the database? I don't think your issue is related to the Test window.

In 20 years of using PL/SQL Developer, I have never tried compiling program code in a Command window. You lose all kinds of functionality by not using the Program window designed for the purpose. If this is one script containing multiple separate procedures and functions etc, don't work this way. Place each item in its own separately version-controlled source file with the appropriate file extension (.prc for procedures etc), and edit them in Program windows.
 
Back
Top