-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataGrip Debugger plugin does not load the latest function version #107
Comments
Hi, The plugin shares the Datagrip session. While the stored procedure code is loaded on every debugger step, that's possible the old function definition remains on the active session. Please test update your code with ensuring the debugger session is closed ( in the task bar on bottom right) AND after deleting or closing your active session in the service panel. When the stored procedure is updated it should have a different OID displayed on the code editor (in brackets after the procedure name). Anyway code update workflow remains a big caveat of the debugger, hope this helps until we find a better solution. |
Thank you for the fast reply.
I tried closing all sessions, refreshing, deactivating.
The only workaround I found was to Quit/Start DataGrip, which updates the code although the OID in the [ ] debug tab title and left status bar stays the same.
Please let me know if I can help.
Thank you.
Ivan
… On 17 Jul 2023, at 22:08, Alexandre Boyer ***@***.***> wrote:
Hi,
The plugin shares the Datagrip session. While the stored procedure code is loaded on every debugger step, that's possible the old function definition remains on the active session.
Please test update your code with ensuring the debugger session is closed ( in the task bar on bottom right) AND after deleting or closing your active session in the service panel.
When the stored procedure is updated it should have a different OID displayed on the code editor (in brackets after the procedure name).
Anyway code update workflow remains a big caveat of the debugger, hope this helps until we find a better solution.
—
Reply to this email directly, view it on GitHub <#107 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ALFXXOQGGIGKFA4A5OMQL4DXQWERVANCNFSM6AAAAAA2NA5KVE>.
You are receiving this because you authored the thread.
|
Seems clearly a bug, thanks for your investigation. What's your PG version? |
14
… On 19 Jul 2023, at 0:28, Alexandre Boyer ***@***.***> wrote:
Seems clearly a bug, thanks for your investigation. What's your PG version?
—
Reply to this email directly, view it on GitHub <#107 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ALFXXOUQBFPOWDDMRR2Y6DDXQ35WVANCNFSM6AAAAAA2NA5KVE>.
You are receiving this because you authored the thread.
|
@chernia the fix will be available next week. |
Seems fine, but something else pops up: |
@chernia here is my setup and test scenario:
CREATE OR REPLACE FUNCTION inner_debug(IN p_text text)
RETURNS text
LANGUAGE plpgsql
AS
$function$
DECLARE
v_test text;
BEGIN
--Test
v_test = p_text;
v_test = v_test || ' -INNER -' || current_timestamp;
return v_test;
end
$function$;
CREATE TABLE debug
(
id serial,
name text
);
INSERT INTO debug (name) VALUES ('Debug 1');
INSERT INTO debug (name) VALUES ('Debug 2');
CREATE TYPE custom_type AS
(
id integer,
name text
);
CREATE OR REPLACE FUNCTION public.test_debug(p_text text, p_int integer DEFAULT 0)
RETURNS text
LANGUAGE plpgsql
AS
$function$
DECLARE
v_int_array INT[] = ARRAY [6, 7, 8];
v_custom custom_type = (434, 'Custom')::custom_type;
v_debug_array debug[];
v_debug debug;
v_text TEXT = 'hchc';
v_int INT = 45;
v_date date = NULL;
BEGIN
--Test
v_text = p_text;
v_text = v_text || ' -' || current_timestamp;
v_text = v_text || ' -' || current_timestamp;
v_int_array = array_append(v_int_array, p_int);
SELECT * FROM debug limit 1 into v_debug;
v_int_array = array_append(v_int_array, 3);
SELECT array_agg(d) FROM debug d into v_debug_array;
v_int_array = array_append(v_int_array, 5);
v_int_array = array_append(v_int_array, 7);
v_text = inner_debug(p_text);
v_int = v_int + 1;
v_date = current_date;
SELECT array_agg(id) FROM debug into v_int_array;
return 'DEBUG END';
end
$function$; In ran this CREATE EXTENSION IF NOT EXISTS pldbgapi;
SELECT * FROM test_debug('ZZEZ', 1);
Could you please provide more information that I can reproduce the problem? Thanks! |
Thanks the test is fine. Reloads code. Once I got an error: Unfortunately on some functions, the Debug window closes immediately and when I open it, it says |
Describe the bug
When a function code is updated, the debugger does not load the new version unless one quits DataGrip and starts it agian.
To Reproduce
Steps to reproduce the behavior:
The old code is loaded, unless DataGrip is restarted.
Expected behavior
When a function code changes, the debugger should load the new version on every debug run.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: