cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging in PDK

Murali_Shanmu
Active Contributor
0 Kudos

Hi

Where in SAP J2EE console should i go and activate my debugging options ? Can anyone please guide me to debug my HTMLB code. There are lot of nodes in SAP J2EE Config tool ?

Murali.

Accepted Solutions (1)

Accepted Solutions (1)

pravesh_verma
Active Contributor
0 Kudos

Hi Muralidaran,

You can start the debugging mode in two ways.

<b>1) Through NWDS:</b>

<b>Go to SAP J2EE Engine Cluster Overview-> Server 0 -> (Right Click)-> Enable Debugging of Process</b>.

This will automatically restart your J2EE engine. And after it is restarted successfully, the debug mode will be ON.

<b>2) Through Config Tool:</b>

You can enable the debuggine mode from the Config Tool as well. Just visit the following path :

<b>C:\usr\sap\<SID>\JC<SYS_NO>\j2ee\configtool\configtool.bat</b>

Click on the your instance. Then under the tab VM Environment, Set the DebugMode = true.

Restart the engine now. This will open the J2EE server again in the Debug Mode.

I hope this should Solve your problem.

Regards

Pravesh

PS: Please consider rewarding points if helpful or Solved.

Murali_Shanmu
Active Contributor
0 Kudos

Hi Pravesh

Can u still be more clear about how to set properties in NWDS. I dont know where to find this property ?

pravesh_verma
Active Contributor
0 Kudos

Hi Muralidaran,

It may be possible that you have not opened the SAP J2EE Engine Cluster Overview. For that just follow these steps:

<b>Windows -> Show View -> Others -> SAP J2EE Engine Cluster Overview</b>, this must be there at the top of your NWDS (Right Hand Top).

After that when you get the view. Expand the <i>Green</i>, coloured server nodes. There you will find the <b>Server 0</b>. This is what I was talking about.

I hope this solves your problem.

Regards

Pravesh

Murali_Shanmu
Active Contributor
0 Kudos

Hi

I dont find 'SAP J2EE Engine Cluster Overview' in my views. What could be the reason ?

I tried doing it in the second way. I went to J2EE Config tool. Selected the server instance and enabled the Debuggable option and gave port as 50021.

Next in my NWDS, i cliked on Debug and creates a Remote Java Application and filled up the entries with Project name and port name. When i clicked on Debug button, it tried connecting and connection failed to remote VM. Please Help.

Former Member
0 Kudos

Dear Murali,

As suggested you can set the same on J2ee engine cluster view in IDE.

When you open IDE you should be able to see a view titled

"J2ee Engine". if you are not able to view that, you should go to

Windows-> Show view-> other -> j2ee -> j2ee engine

this view will show you cluster details as you see in MMC of your server.

Nowe you see debug mode there. you can select to enable debugging there.

I assume you have done required settings at config level.

Hope this helps,

regards,

Sudhir

pravesh_verma
Active Contributor
0 Kudos

Hi Muralidaran,

<i>>>I dont find 'SAP J2EE Engine Cluster Overview' in my views.</i>

In the <b>Show View</b> Option, Can you see the <b>J2EE</b>, open that node you will find the 'SAP J2EE Engine Cluster Overview', Just search though it properly, it must be there.

<i>>>Selected the server instance and enabled the Debuggable option and gave port as 50021</i>

Hey!! why have you changed the port, let it be the same there must be some formula for that initially. Keep that only. No need to chane it. Just write <b>true</b> in <b>DebugMode</b>, initially this would have been <b>false</b>.

Changing this value only is sufficient for you.

I hope this solves your problem

Regards

Pravesh

PS: Please consider rewarding points if helpful or solved.

Former Member
0 Kudos

hi,

See this weblog. May clear your doubts

Regards,

Ganesh N

Murali_Shanmu
Active Contributor
0 Kudos

Hi All

I finally found it under 'Windows-> Show view-> other -> j2ee -> j2ee engine'. Sorry about that Pravesh.. I shall try working on it now.

pravesh_verma
Active Contributor
0 Kudos

Hi Muralidaran,

No need to be sorry Yaar!! We sometimes do miss the things.. Anyways try and do that and kindly revert back with the result.

Also if you have made any changes thrugh the cofigurational tool. Just make it to it initial values. Also one more thing. If you are settig this debug mode through the NWDS then this will be set only till you resart the server next time.

When ever you will restart the server again. This will again turn back to non debuggable. So it will be better if you set this forever :). I mean through the config tool, If you will set the <b>DebugMode</b> to true here you will need not change it again and again.

I hope your problem gets solved.

Regards

Pravesh

Murali_Shanmu
Active Contributor
0 Kudos

Thanks a lot. Will let you know by End of the day.

Murali_Shanmu
Active Contributor
0 Kudos

Hi

It is kind of working now for me. I just have one more query. I made the settings in the config tool. Then came to NWDS and created an Remote Java application setting and then switched over to debug perspective.

Now i ran the iView from my portal. I could see the control stop in my source code. But i have to manually move to my Debug perspective. From my debug perspective, if i click on resume, the flow stops in the next break point and switches to my source code in EP perspective.

Question 1) How do i debug my program... With the perspectives switching, i just cannot do it.

2) What are the shortcuts to stepin and step out.. All shortcut keys..

pravesh_verma
Active Contributor
0 Kudos

Hi Muralidaran,

First of all I think If you have solved your problem then you must have closed the thread and would have rewarded the points appropriately.

Anyways, For your questions:

<b>>>1) How do i debug my program... With the perspectives switching, i just cannot do it.</b>

Ans: Ideally it should go to the debug perspective itself. Anyways that is secondary part for the question. Main thing is how do you debug it.. For that just select the variable or the statement you want to check the value for. And now right click it. Select <b>Inspect</b> OR perform <b>[ctrl][shift]i</b>, by doing so you can check the value of that variable at that instance.

I hope you get it.

<b>>>2) What are the shortcuts to stepin and step out.. All shortcut keys..</b>

Ans: For this you have to check it yourself. There are many short cuts. If I start writing all it will take a lot of time.

For more information see this link:

<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/c0/ef07876f9ef0479194965520f87837/content.htm">Starting a Debug Session</a>

Regards

Pravesh

PS: Kindly close the thread whenever you feel the question has been answered.

Murali_Shanmu
Active Contributor
0 Kudos

Hi

I knew you would be there pravesh. Ok, I have closed the thread. I was finding it so difficult to debug. After seeing so many user friendly debugging softwares, i somehow found this one a bit tough. Might be i still need to learn more about it. Anyway thanks. The link you had sent was very informative.. Your help is really appreciated.

Regards,

Murali.

Answers (0)