Skip to content
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

Remote debugging for Foxx services #1538

Open
tomterl opened this issue Oct 23, 2015 · 9 comments
Open

Remote debugging for Foxx services #1538

tomterl opened this issue Oct 23, 2015 · 9 comments
Labels
1 Feature 3 Core 3 JS API Server internal JavaScript API issues

Comments

@tomterl
Copy link

tomterl commented Oct 23, 2015

Is it planned, or even possible, to allow remote debugging via the V8 debug protocol, or swank.js (a node module), or another (homegrown) solution like a dbgP implementation?

@dothebart
Copy link
Contributor

Interesting Idea. One would probably have to run the test database with only 1 js context to make this working properly (else you can't tell which context your foxx is going to run in). I can't promise a time frame for this yet.

@tomterl
Copy link
Author

tomterl commented Oct 23, 2015

If it's under consideration, I'm content 👍

@tomterl
Copy link
Author

tomterl commented Oct 23, 2015

Nota Bene: Would this be extendible to user supplied aql-functions?

@dothebart
Copy link
Contributor

probably yes.

@dothebart dothebart added this to the Backlog milestone Oct 23, 2015
@pluma pluma changed the title Feature Request: Remote debugging foxxx-applications Remote debugging for Foxx services Jun 17, 2016
@fceller fceller removed this from the Features milestone Aug 6, 2017
@pilot4u
Copy link

pilot4u commented Feb 24, 2018

Is there any progress with this request?
Will it be possible to attach debugger to Foxx service?

@tomterl
Copy link
Author

tomterl commented Aug 3, 2018

As our foxx services get more elaborate, attaching a real debugger would really help in analyzing aberrant runtime behavior in a more timely fashion -- is there light at the end of the tunnel? Or are we stuck with console.log() for good (or bad...)?

@pluma pluma removed their assignment Oct 26, 2018
@pluma pluma added 3 Core 3 JS API Server internal JavaScript API issues and removed 3 Foxx labels Oct 26, 2018
@pluma
Copy link
Contributor

pluma commented Oct 26, 2018

The JS debugger protocol is based on websockets. It would also probably require running ArangoDB with a single V8 thread. Although the main use case is debugging Foxx services, this is actually not at all related to Foxx implementation-wise.

@pavelsevcik
Copy link

@pluma thank you for valuable insight

to move forward, questions are

  • Q1: would be possible to allocate some time to this issue, as it's blocker for broader adoption of Foxx, especially for more complex solutions, as lack of modern debugging significantly reduces benefits like performance and scaleability of Foxx over more complex setups like node+express+arangojs? Questions asking about debugging goes back to 2014 and I personaly heard and felt few times, that without debugging is Foxx too painful to develop with, aka not usable
  • Q2: is it possible to implement some sort of combination of arangod option like --javascript.inspect true which would set also --javascript.v8-contexts 1 to enable inspector agent like nodejs does?
  • Q3: if (Q2) { return {priority, ETA} }

Thanks, looking forward for RE

@pluma
Copy link
Contributor

pluma commented Dec 20, 2018

@pavelsevcik I feel your pain but this is a fairly large feature and will likely require very gradual iteration to become feasible. I think the biggest blocker is websocket support, as the debugger protocol depends on it. I suggest also following #602, which is likely a related problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 Feature 3 Core 3 JS API Server internal JavaScript API issues
Projects
None yet
Development

No branches or pull requests

6 participants