Add pl/plv8 debugging support #11144
Unanswered
wiverson
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Feature request
There (appears) to currently be no way to attach a debugger to the plv8 engine. This means that debugging/trouble-shooting is very difficult and requires a combination of console logging and modifying functions to abort & return text data early while triaging.
Is your feature request related to a problem? Please describe.
PostgREST allows pl/plv8 offers many interesting options, but these become increasingly more challenging to support/debug as things get more complicated. At best it's a lot of guess-work and returning text intermediate steps to try to figure out what's going on.
Describe the solution you'd like
My ideal would be able to attach to the v8 engine via WebStorm and/or Visual Studio Code or possibly Chrome DevTools and be able to (at a minimum) set breakpoints, inspect variables, etc.
There is a V8 inspector protocol https://v8.dev/docs/inspector - in theory ahem this would involve tweaking the plv8 to ensure that the debugger is exposed and attachable, as well as documenting the process.
Describe alternatives you've considered
Right now it's basically console logging at best, tweaking functions to send text back as intermediate failures at worst.
All reactions