Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-28-2018 08:24 AM
HI, I was new to procedures and was trying to debug the procedures that i’ve wrote. can someone suggest on how to do that.?
Solved! Go to Solution.
08-29-2018 02:06 AM
Yes that's useful for determining issues with existing setups / datasets.
In general I still suggest to debug / fix issues using unit tests.
08-28-2018 08:35 AM
Usually you write a unit or integration test that uses the procedure, and then if the test fails, you can set break-points in your IDE and debug the code.
The procedure example repository helps you to get set-up:
And the manual walks through writing and testing procedures, see the about message on top of the #neo4j-graph-platform:procedures-apoc category.
08-28-2018 11:55 PM
Thanks a ton micheal for the prompt reply. This community is awesome. Used the above example, enabled debug listener using https://neo4j.com/docs/java-reference/3.4/server-debugging/ and I was able debug with breakpoint in my procedure.
In order to configure the Neo4j server for remote debugging sessions, the Java debugging parameters need to be passed to the Java process through the configuration. They live in the conf/neo4j.conf file.
In order to specify the parameters, add a line for the additional Java arguments like this:
dbms.jvm.additional=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
This configuration will start a Neo4j server ready for remote debugging attachement at localhost and port
5005
. Use these parameters to attach to the process from Eclipse, IntelliJ or your remote debugger of choice after starting the server.
08-29-2018 02:06 AM
Yes that's useful for determining issues with existing setups / datasets.
In general I still suggest to debug / fix issues using unit tests.
08-30-2018 04:44 AM
The Neo4j Procedure Compiler may be useful here too, at least to catch the early kinds of errors at compilation.
All the sessions of the conference are now available online