Quantcast

Some ideas about PSQL debugger feature

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Some ideas about PSQL debugger feature

Adriano dos Santos Fernandes-3
Hi!

Currently missing (official / really correct) support for PSQL debugging
is IMO something about trick decisions to make a really useful tool.

What would be the debugger tool?
- A special command-line tool? (difficult to implement and use,
non-standard tool)
- A special GUI tool? (difficult to implement, non-standard tool)
- Other?

How would client debug tool will interact with server?
- Another TCP port in the server? (firewall problems like with events)
- Other

How would debug tool will interact with database?
- Another attachment? (cannot interact with user transaction)
- Same attachment/transaction?

I have some ideas about these problems.

Firebird requests (statement execution) is about start/send receive loops.

I understand that debug communication (engine informing that execution
hit a breakpoint, client want the engine to resume/step) may be injected
at this and handled in internals of client.

Client may also asynchronous (like cancelOperation does) send actions
(wanting to suspend execution, informing new breakpoints, etc) to server.

Opening of a TCP port to interact with debug tool will be client
responsibility.

As for server/engine when a statement execution is suspended, it treats
attachment unlocked for new operations, so debug tool (with helper
client debug-module, with may be a plugin) may use the same
attachment/transaction from user.

And what about debug tool?

Client debug-module may use a existing debug protocol (java, javascript,
gdb, etc) and may be directly usable from existing standard debug tools.

While specially this last item requires some amount of research, this
set of decisions may be the easier and at the same time more useful
implementation for the feature.


Adriano

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some ideas about PSQL debugger feature

Dimitry Sibiryakov-3
30.03.2017 19:50, Adriano dos Santos Fernandes wrote:
> Currently missing (official / really correct) support for PSQL debugging
> is IMO something about trick decisions to make a really useful tool.

   I would prefer at first to figure out what functionality is required for such tool.
Perhaps, debugging don't have to be an interactive process if everything needed is to
print values of some variables at some points of PSQL execution and control flow.


--
   WBR, SD.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some ideas about PSQL debugger feature

Adriano dos Santos Fernandes-3
Em 30/03/2017 15:05, Dimitry Sibiryakov escreveu:
> 30.03.2017 19:50, Adriano dos Santos Fernandes wrote:
>> Currently missing (official / really correct) support for PSQL debugging
>> is IMO something about trick decisions to make a really useful tool.
>
>    I would prefer at first to figure out what functionality is required for such tool.
> Perhaps, debugging don't have to be an interactive process if everything needed is to
> print values of some variables at some points of PSQL execution and control flow.
>

Debugging features are well-know. Here you talk about hacks.


Adriano

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some ideas about PSQL debugger feature

Alex Peshkoff
In reply to this post by Adriano dos Santos Fernandes-3
On 03/30/17 20:50, Adriano dos Santos Fernandes wrote:


> How would client debug tool will interact with server?
> - Another TCP port in the server? (firewall problems like with events)
> - Other

Service.
Use more or less same technique which is used by trace.
In that case debug API becomes a subset of services API. What about a
tool - in trivial case even dumb fbsvcmgr may be used. And certainly GUI
clients starting with flamerobin are free to use lower-level API to let
people have beautiful debugging interface.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some ideas about PSQL debugger feature

Dimitry Sibiryakov-3
30.03.2017 20:16, Alex Peshkoff wrote:
> Use more or less same technique which is used by trace.

   The simplest way is to expand trace capacities with information required for debugging.
   And even if "debugging" is "well-known" it still must be exactly defined before
implementation.


--
   WBR, SD.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some ideas about PSQL debugger feature

Dimitry Sibiryakov-3
In reply to this post by Adriano dos Santos Fernandes-3
30.03.2017 20:13, Adriano dos Santos Fernandes wrote:
> Debugging features are well-know.

   GDB, MSVC and Delphi all have very different debugging features. Which one is well know
for you?


--
   WBR, SD.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some ideas about PSQL debugger feature

Adriano dos Santos Fernandes-3
In reply to this post by Adriano dos Santos Fernandes-3
Em 30/03/2017 14:50, Adriano dos Santos Fernandes escreveu:
> Client debug-module may use a existing debug protocol (java, javascript,
> gdb, etc) and may be directly usable from existing standard debug tools.
>
> While specially this last item requires some amount of research, this
> set of decisions may be the easier and at the same time more useful
> implementation for the feature.

Another solution that seems more approachable, instead of implement a
language's debug protocol, implement a Visual Studio Code debug adapter.

What great would be to debug Firebird databases from vscode, without
complex server-side configurations or custom tools...


Adriano

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Loading...