Re: [pgAdmin4][Debugger]: Initial Patch

From: Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Debugger]: Initial Patch
Date: 2016-04-14 12:52:17
Message-ID: CACCA4P3DMJ3ArcwZ5v-AOOuHwfMJQqc-iNCeeu09XdHL3rsG1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

Please find attached v2 patch file of the debugger which fixes the below
issues which was not present in the first patch.
In this patch, we have added new table in sqlite database to store the
functions arguments value user has given during debugging.
After applying this patch, user needs to execute "setup.py" to create the
new table in pgadmin4.db file.

- In direct debugging, when user debug the function then arguments
values will be stored in the sqlite database so when user debug the same
function again then previous values will be filled in the user input dialog.
- Once the execution is completed then user will be able to do the debug
of the same function again by pressing the "Continue/Restart" button.
- User can debug the "procedure" which is supported in PPAS database.
- Replaced the "Glyphicon" with the "font-awesome" icons.

Below are the TODOs

- Validate the input arguments values changed by user while depositing
the value during debugging.
- Need to implement the code folding in the codemirror editor area.
- As per the Ashesh's suggestion, need to add debug logs information so
that we can get the state of the debug function. Also need to add "arrow"
next to breakpoint in the gutters as per the pgadmin3.
- Need to add "Debug package initializer" in the user input dialog for
the direct debugging.
- Last but not least "Review comments" :)

Below functionalities are implemented but testing are pending.

- Trigger functions need to test with the debugger.
- Functions are tested with data types (like text, integer etc.) but it
needs to be tested with all the data types for direct debugging.
- Functions/Procedures need to test with PPAS 9.2 and earlier version
where debugger version is different.

Can you please review the patch file and let us know the comments.

Thanks,
Neel Patel

On Wed, Apr 6, 2016 at 1:37 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> On Wed, Apr 6, 2016 at 8:57 AM, Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
> wrote:
> > Hi Dave,
> >
> > I got the root cause. Issue will reproduce when we applied Akshay's query
> > tool patch.
> > Issue was once the panel was initialized, HTML file was not getting
> loaded
> > in to the panel due to the change in frame.js.
> >
> > Both query tool and debugger patch file contains the change in "frame.js"
> > file. Once you applied the query tool patch and after that debugger then
> > debugger patch should fail but i don't know why you do not get any error.
> >
> > Solution:-
> >
> > Open "frame.js" file and add the below line in "setTimeout" function
> which
> > is required by debugger.
> >
> >
> pgBrowser.Events.trigger('pgadmin-browser:frame:urlloaded:'
> > + that.name, frame, that.url, self);
> >
> > Do let us know if you still face the same issue.
>
> Ahh, good catch - that got it :-)
>
> Thanks!
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

Attachment Content-Type Size
debugger_14_April_v2.patch application/octet-stream 196.8 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Murtuza Zabuawala 2016-04-14 12:57:28 Re: PATCH: Added Node Type & Catalog objects [pgAdmin4]
Previous Message Dave Page 2016-04-14 12:40:05 pgAdmin 4 commit: Fix favicon routing