cancel
Showing results for 
Search instead for 
Did you mean: 

How to switch to debugging "manually"

Former Member
0 Kudos

Hi there, i get seriously set up about the eclipse server view and it's behavior and slowness, cost me so much time and nerves. So i would really love to work only with neo commandline neo-maven-plugin. So all of you  uber Nerds from SAP , (how) can i switch a server to debug mode? if it can't be done via maven/neo is there a programmatic way or can i write my own stuff and contribute?

Best regards

Mathias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

So in case anybody else wanne enable debuging, it can be accomplished via the props.ini file of the server just add

-Xdebug

-Xrunjdwp:transport=dt_socket,address=7090,server=y,suspend=n

and you can attach a remote debugging session in eclipse. Anyhow i will look into the maven plugin, maybe there is a nicer solution than modifying property files

0 Kudos

Hi Mathias,

I am glad that you found a solution for your problem.

Btw, if you use SAP JVM to run your server, then switching in debug happens instantly and you do not have to restart the server. Hopefully this will solve the slowliness in Eclipse and you will be back to the IDE. At the end you will need an IDE in order to debug.

If you are willing to try the SAP JVM, then you just download and extract it as described here:

SAP HANA Cloud Platform

After that switch the server JRE as described in the second part of point 7 here: SAP HANA Cloud Platform

Greetings,

Alex

Former Member
0 Kudos

I use SAP JVM. But if a Server is already Running, how can i switch it into debug mode(without using eclipse)? Via OSGI console?

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mathias,

sapjvm includes a tool called jvmmon-gui. Simply start it, choose your process and enable debugging. Afterwards attach your eclipse environment to it.

Best regards,

Markus

Former Member
0 Kudos

Hi Markus,

now i am curious

When i start the Server via Eclipse i can see the process immediately, but my installed and started Server via maven/neo i don't see. I assume that is because is doesn't use sap jvm for some reason? can you tell neo which jvm to use?

Regards

0 Kudos

Hi Mathias,

I cannot get the usecase. Why you would like to switch the server into debug outside Eclipse?

If there is something that does not work for you, we would be glad to fix it

Greetings,

Alex

0 Kudos

Hi Mathias,

I suppose that it is the default JVM found in the path. You can check it by opening command line and typing: "java -version"

You can change it by modifying your path.

BR,

Alex

Former Member
0 Kudos

Hi Alexander,

well my Use-Case is related to stability and "fastness" of development. for example if Hot Code replacement fails(which is quite often in my opinion) and the server needs to terminate, i always need to delete the server and create a new one which is quite some work, because you need to import destinations, User, Groups and so on. Deployment sometimes is just painfully slow, even with incremental deployment.  just a few days ago i had(still have) an issue where i can't use my local IDP  anymore (see

even deleting and creating new servers didn't bring any solution.

So i started using maven-neo-plugin which is just brilliant imho. I have several Profiles, when calling the install-local goal all my destinations, user, groups, config files get copied to the right place and my server starts without any issues. Since i added the parameters to props.ini i can debug and i am happy, i can pass parameters to tell maven which web.xml to use (e.g. with authentication, without etc.). With that setup you could even start thinking about Intellij IDEA

especially the Http 404 issue which cost me about a days work convinced me not to use the Eclipse Server View/Runtime anymore.

That is where my Use-Case originated from. And if you guys further enhance the maven plugin for e.g. local delta deployment i will be happy

Regards Mathias

Former Member
0 Kudos

Could i set the sap JVM in deamon.sh?

0 Kudos

Hi Mathias,

I think that the easiest way would be to set a JAVA_HOME to the SAP JVM, then in your daemon.sh you have:


if [ ! -z "$JAVA_HOME" ]; then # $JAVA_HOME is not null

    javaExe="$JAVA_HOME/bin/$javaCommand"

I have to further check the local IDP issue that you mentioned. My first guess is again different JVM in IDE and command line. If this is correct maybe you will be able to confirm it, when you switch the command to SAP JVM.

Greetings,

Alex

Answers (0)