Print Thread
Test Window shows old procedure / function Code after recompiling
#66739 04/17/25 12:16 PM
Joined: Apr 2025
Posts: 3
W
WSW-DBA Offline OP
Member
OP Offline
Member
W
Joined: Apr 2025
Posts: 3
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

Re: Test Window shows old procedure / function Code after recompiling
WSW-DBA #66741 04/18/25 08:55 AM
Joined: Aug 1999
Posts: 22,663
Member
Offline
Member
Joined: Aug 1999
Posts: 22,663
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?


Marco Kalter
Allround Automations
Re: Test Window shows old procedure / function Code after recompiling
WSW-DBA #66743 04/22/25 02:56 AM
Joined: Feb 2003
Posts: 403
The Netherlands
Member
Offline
Member
Joined: Feb 2003
Posts: 403
The Netherlands
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.

Re: Test Window shows old procedure / function Code after recompiling
WSW-DBA #66744 04/22/25 08:04 AM
Joined: Aug 1999
Posts: 22,663
Member
Offline
Member
Joined: Aug 1999
Posts: 22,663
Quote
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.


Marco Kalter
Allround Automations
Re: Test Window shows old procedure / function Code after recompiling
Marco Kalter #66746 04/23/25 03:03 PM
Joined: Apr 2025
Posts: 3
W
WSW-DBA Offline OP
Member
OP Offline
Member
W
Joined: Apr 2025
Posts: 3
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.

Re: Test Window shows old procedure / function Code after recompiling
WSW-DBA #66752 04/26/25 04:57 PM
Joined: Sep 2003
Posts: 395
London, UK
Member
Offline
Member
Joined: Sep 2003
Posts: 395
London, UK
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?

Re: Test Window shows old procedure / function Code after recompiling
WSW-DBA #66765 04/30/25 08:18 AM
Joined: Apr 2025
Posts: 3
W
WSW-DBA Offline OP
Member
OP Offline
Member
W
Joined: Apr 2025
Posts: 3
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

Re: Test Window shows old procedure / function Code after recompiling
WSW-DBA #66767 04/30/25 10:51 AM
Joined: Feb 2003
Posts: 403
The Netherlands
Member
Offline
Member
Joined: Feb 2003
Posts: 403
The Netherlands
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.

Re: Test Window shows old procedure / function Code after recompiling
patch #66768 04/30/25 12:59 PM
Joined: Mar 2025
Posts: 5
M
Member
Offline
Member
M
Joined: Mar 2025
Posts: 5
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

Re: Test Window shows old procedure / function Code after recompiling
WSW-DBA #66774 05/03/25 07:11 AM
Joined: Sep 2003
Posts: 395
London, UK
Member
Offline
Member
Joined: Sep 2003
Posts: 395
London, UK
Originally Posted by WSW-DBA
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.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.128s Queries: 14 (0.071s) Memory: 2.5450 MB (Peak: 3.0397 MB) Data Comp: Off Server Time: 2025-06-14 14:31:31 UTC
Valid HTML 5 and Valid CSS