debugging an unmanaged Neo4j extension

元气小坏坏 提交于 2019-12-11 02:24:57

问题


I just started developing an unmanaged extension for Neo4j server using the Graphaware framework. Everything is fine so far. Even unit tests are working. But I would like to actually debug the extension running the Neo4j server from within Intellij.

Can anybody give me a hint on how to do that?

Many thanks in advance, Oliver

PS: This extension is being called via rest interface from a separate web server providing hosting the actual web application.


回答1:


You need to enable jvm remote debugging in conf/neo4j-wrapper.conf. Amend a new line to this file:

wrapper.java.additional=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Xdebug-Xnoagent-Djava.compiler=NONE-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

In case you want to debug the startup sequence as well, use set suspend=y above.

In your debugger setup a remote debugging session to localhost:5005 or myhostname:5005.




回答2:


For neo4j 3.0 you have to amend this line to conf/neo4j-wrapper.conf.

dbms.jvm.additional=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005


来源:https://stackoverflow.com/questions/27692597/debugging-an-unmanaged-neo4j-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!