cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

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.?

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.?

1 ACCEPTED SOLUTION

Yes that's useful for determining issues with existing setups / datasets.

In general I still suggest to debug / fix issues using unit tests.

View solution in original post

4 REPLIES 4

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.

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.

Yes that's useful for determining issues with existing setups / datasets.

In general I still suggest to debug / fix issues using unit tests.

The Neo4j Procedure Compiler may be useful here too, at least to catch the early kinds of errors at compilation.