How to debug a module?

classic Classic list List threaded Threaded
12 messages Options
BlackKnight-2 BlackKnight-2
Reply | Threaded
Open this post in threaded view
|

How to debug a module?

Hi, folks,

Is there a good way to debug a module?

I've learnt how to debug the api/web. I've also tried module unit test,
which's very helpful but still sometimes I hope to track into the module
from the api.

Any comments?

Thanks~~

Dawang

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
Nyoman Ribeka Nyoman Ribeka
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a module?

Debugging module is pretty much like debugging core api dawang.

http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide

But instead giving the core project in the debug configuration, you give
the module project.

Hope it helps.

On 05/11/2010 10:31 PM, BlackKnight wrote:

> Hi, folks,
>
> Is there a good way to debug a module?
>
> I've learnt how to debug the api/web. I've also tried module unit test,
> which's very helpful but still sometimes I hope to track into the module
> from the api.
>
> Any comments?
>
> Thanks~~
>
> Dawang
>
> _________________________________________
>
> To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]

--
Thanks,

Nyoman Ribeka

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
hablutzel1 hablutzel1
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a module?

Yes, just select your module project instead of the openmrs project  in the debug window ( remote java application), and don't forget to set java_opts for tomcat:

-Xdebug
-Xnoagent
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000



2010/5/12 Nyoman Ribeka <[hidden email]>
Debugging module is pretty much like debugging core api dawang.

http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide

But instead giving the core project in the debug configuration, you give
the module project.

Hope it helps.

On 05/11/2010 10:31 PM, BlackKnight wrote:
> Hi, folks,
>
> Is there a good way to debug a module?
>
> I've learnt how to debug the api/web. I've also tried module unit test,
> which's very helpful but still sometimes I hope to track into the module
> from the api.
>
> Any comments?
>
> Thanks~~
>
> Dawang
>
> _________________________________________
>
> To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]

--
Thanks,

Nyoman Ribeka

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]



--
Jaime Hablutzel

(tildes omitidas intencionalmente)

[hidden email] from OpenMRS Developers' mailing list
BlackKnight-2 BlackKnight-2
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a module?

In reply to this post by Nyoman Ribeka
Thank you Ribeka, that solves my problem.


Best Regards
Dawang

Nyoman Ribeka 写道:

> Debugging module is pretty much like debugging core api dawang.
>
> http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide
>
> But instead giving the core project in the debug configuration, you give
> the module project.
>
> Hope it helps.
>
> On 05/11/2010 10:31 PM, BlackKnight wrote:
>  
>> Hi, folks,
>>
>> Is there a good way to debug a module?
>>
>> I've learnt how to debug the api/web. I've also tried module unit test,
>> which's very helpful but still sometimes I hope to track into the module
>> from the api.
>>
>> Any comments?
>>
>> Thanks~~
>>
>> Dawang
>>
>> _________________________________________
>>
>> To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.
>>
>> [mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
>>    
>
>  

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
firzhan firzhan
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a module?

Hi folks,

I am still having the problem. I did all the configurations mentioned on the wiki page.

But it still throws the error - "Failed to connect to remote VM. Connection refused.  Connection refused".

I have pastebin the /etc/init.d/tomcat file http://pastebin.com/ATkCwPdY.

I am using the tomcat manager.

Any assistances ???

2010/5/12 BlackKnight <[hidden email]>
Thank you Ribeka, that solves my problem.


Best Regards
Dawang

Nyoman Ribeka 写道:
> Debugging module is pretty much like debugging core api dawang.
>
> http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide
>
> But instead giving the core project in the debug configuration, you give
> the module project.
>
> Hope it helps.
>
> On 05/11/2010 10:31 PM, BlackKnight wrote:
>
>> Hi, folks,
>>
>> Is there a good way to debug a module?
>>
>> I've learnt how to debug the api/web. I've also tried module unit test,
>> which's very helpful but still sometimes I hope to track into the module
>> from the api.
>>
>> Any comments?
>>
>> Thanks~~
>>
>> Dawang
>>
>> _________________________________________
>>
>> To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.
>>
>> [mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
>>
>
>

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]



--
With Regards

firzhan

Skype :- firzhan007
Aim :- firzhanrcfi

[hidden email] from OpenMRS Developers' mailing list
hablutzel1 hablutzel1
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a module?

Not sure, but maybe you should place JAVA_OPTS outside that conditional.


  1. if [ -z "$JAVA_OPTS" ]; then
  2.         JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -Xms512m -XX:PermSize=256m  -XX:MaxPermSize=256m  -XX:NewSize=128m  -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000"
  3. fi

Then, before trying to connect eclipse to tomcat for debugging make a telnet to localhost

telnet localhost 5000

If it works then check you eclipse configuration at remote java application



2010/5/12 firzhan naqash <[hidden email]>
Hi folks,

I am still having the problem. I did all the configurations mentioned on the wiki page.

But it still throws the error - "Failed to connect to remote VM. Connection refused.  Connection refused".

I have pastebin the /etc/init.d/tomcat file http://pastebin.com/ATkCwPdY.

I am using the tomcat manager.

Any assistances ???

2010/5/12 BlackKnight <[hidden email]>

Thank you Ribeka, that solves my problem.


Best Regards
Dawang

Nyoman Ribeka 写道:
> Debugging module is pretty much like debugging core api dawang.
>
> http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide
>
> But instead giving the core project in the debug configuration, you give
> the module project.
>
> Hope it helps.
>
> On 05/11/2010 10:31 PM, BlackKnight wrote:
>
>> Hi, folks,
>>
>> Is there a good way to debug a module?
>>
>> I've learnt how to debug the api/web. I've also tried module unit test,
>> which's very helpful but still sometimes I hope to track into the module
>> from the api.
>>
>> Any comments?
>>
>> Thanks~~
>>
>> Dawang
>>
>> _________________________________________
>>
>> To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.
>>
>> [mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
>>
>
>

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]



--
With Regards

firzhan

Skype :- firzhan007
Aim :- firzhanrcfi

[hidden email] from OpenMRS Developers' mailing list



--
Jaime Hablutzel

(tildes omitidas intencionalmente)

[hidden email] from OpenMRS Developers' mailing list
Ben Wolfe Ben Wolfe
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a module?

Are you able to do debugging and break points in trunk via instrcutions
here?
http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide

I added one more section for module debugging...its just adding the your
module's project to the "Source" tab in the Debug dialog box.

Ben

On 05/12/2010 12:37 PM, Jaime Hablutzel Egoavil wrote:

> Not sure, but maybe you should place JAVA_OPTS outside that conditional.
>
>
>    1.
>       if [ -z "$JAVA_OPTS" ]; then
>    2.
>                JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -Xms512m
>       -XX:PermSize=256m  -XX:MaxPermSize=256m  -XX:NewSize=128m  -Xdebug
>       -Xnoagent
>       -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000"
>    3.
>       fi
>
>
> Then, before trying to connect eclipse to tomcat for debugging make a
> telnet to localhost
>
> telnet localhost 5000
>
> If it works then check you eclipse configuration at remote java application
>
>
>
> 2010/5/12 firzhan naqash <[hidden email]
> <mailto:[hidden email]>>
>
>     Hi folks,
>
>     I am still having the problem. I did all the configurations
>     mentioned on the wiki page.
>
>     But it still throws the error - "Failed to connect to remote VM.
>     Connection refused.  Connection refused".
>
>     I have pastebin the /etc/init.d/tomcat file
>     http://pastebin.com/ATkCwPdY.
>
>     I am using the tomcat manager.
>
>     Any assistances ???
>
>     2010/5/12 BlackKnight <[hidden email]
>     <mailto:[hidden email]>>
>
>         Thank you Ribeka, that solves my problem.
>
>
>         Best Regards
>         Dawang
>
>         Nyoman Ribeka 写道:
>          > Debugging module is pretty much like debugging core api dawang.
>          >
>          > http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide
>          >
>          > But instead giving the core project in the debug
>         configuration, you give
>          > the module project.
>          >
>          > Hope it helps.
>          >
>          > On 05/11/2010 10:31 PM, BlackKnight wrote:
>          >
>          >> Hi, folks,
>          >>
>          >> Is there a good way to debug a module?
>          >>
>          >> I've learnt how to debug the api/web. I've also tried module
>         unit test,
>          >> which's very helpful but still sometimes I hope to track
>         into the module
>          >> from the api.
>          >>
>          >> Any comments?
>          >>
>          >> Thanks~~
>          >>
>          >> Dawang
>          >>
>          >> _________________________________________
>          >>
>          >> To unsubscribe from OpenMRS Developers' mailing list, send
>         an e-mail to [hidden email]
>         <mailto:[hidden email]> with "SIGNOFF
>         openmrs-devel-l" in the  body (not the subject) of your e-mail.
>          >>
>          >> [mailto:[hidden email]
>         <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>          >>
>          >
>          >
>
>         _________________________________________
>
>         To unsubscribe from OpenMRS Developers' mailing list, send an
>         e-mail to [hidden email]
>         <mailto:[hidden email]> with "SIGNOFF
>         openmrs-devel-l" in the  body (not the subject) of your e-mail.
>
>         [mailto:[hidden email]
>         <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>
>
>
>
>     --
>     With Regards
>
>     firzhan
>
>     Skype :- firzhan007
>     Aim :- firzhanrcfi
>     ------------------------------------------------------------------------
>     Click here to unsubscribe
>     <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l>
>     from OpenMRS Developers' mailing list
>
>
>
>
> --
> Jaime Hablutzel
>
> (tildes omitidas intencionalmente)
> ------------------------------------------------------------------------
> Click here to unsubscribe
> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
firzhan firzhan
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a module?

Ben:

No. When I clicked the debug button in the Debug dialog box it starts to throw the error message -  "Failed to connect to remote VM. Connection refused.  Connection refused".

I just reinstalled the tomcat manager and now I am trying to run the unit test.

On Thu, May 13, 2010 at 12:47 AM, Ben Wolfe <[hidden email]> wrote:
Are you able to do debugging and break points in trunk via instrcutions here? I added one more section for module debugging...its just adding the your module's project to the "Source" tab in the Debug dialog box.

Ben


On 05/12/2010 12:37 PM, Jaime Hablutzel Egoavil wrote:
Not sure, but maybe you should place JAVA_OPTS outside that conditional.


  1.
     if [ -z "$JAVA_OPTS" ]; then
  2.

              JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -Xms512m
     -XX:PermSize=256m  -XX:MaxPermSize=256m  -XX:NewSize=128m  -Xdebug
     -Xnoagent
     -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000"
  3.

     fi


Then, before trying to connect eclipse to tomcat for debugging make a
telnet to localhost

telnet localhost 5000

If it works then check you eclipse configuration at remote java application



2010/5/12 firzhan naqash <[hidden email]
<mailto:[hidden email]>>


   Hi folks,

   I am still having the problem. I did all the configurations
   mentioned on the wiki page.

   But it still throws the error - "Failed to connect to remote VM.
   Connection refused.  Connection refused".

   I have pastebin the /etc/init.d/tomcat file
   http://pastebin.com/ATkCwPdY.

   I am using the tomcat manager.

   Any assistances ???

   2010/5/12 BlackKnight <[hidden email]
   <mailto:[hidden email]>>


       Thank you Ribeka, that solves my problem.


       Best Regards
       Dawang

       Nyoman Ribeka 写道:
        > Debugging module is pretty much like debugging core api dawang.
        >
        > http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide
        >
        > But instead giving the core project in the debug
       configuration, you give
        > the module project.
        >
        > Hope it helps.
        >
        > On 05/11/2010 10:31 PM, BlackKnight wrote:
        >
        >> Hi, folks,
        >>
        >> Is there a good way to debug a module?
        >>
        >> I've learnt how to debug the api/web. I've also tried module
       unit test,
        >> which's very helpful but still sometimes I hope to track
       into the module
        >> from the api.
        >>
        >> Any comments?
        >>
        >> Thanks~~
        >>
        >> Dawang
        >>
        >> _________________________________________
        >>
        >> To unsubscribe from OpenMRS Developers' mailing list, send
       an e-mail to [hidden email]
       <mailto:[hidden email]> with "SIGNOFF

       openmrs-devel-l" in the  body (not the subject) of your e-mail.
        >>
        >> [mailto:[hidden email]
       <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
        >>
        >
        >

       _________________________________________

       To unsubscribe from OpenMRS Developers' mailing list, send an
       e-mail to [hidden email]
       <mailto:[hidden email]> with "SIGNOFF

       openmrs-devel-l" in the  body (not the subject) of your e-mail.

       [mailto:[hidden email]
       <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]




   --
   With Regards

   firzhan

   Skype :- firzhan007
   Aim :- firzhanrcfi
   ------------------------------------------------------------------------
   Click here to unsubscribe
   <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l>
   from OpenMRS Developers' mailing list




--
Jaime Hablutzel

(tildes omitidas intencionalmente)
------------------------------------------------------------------------
Click here to unsubscribe
<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]



--
With Regards

firzhan

Skype :- firzhan007
Aim :- firzhanrcfi

[hidden email] from OpenMRS Developers' mailing list
Darius Jazayeri-3 Darius Jazayeri-3
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a module?

Have you modified your tomcat startup properties, and set the eclipse debugger to connect on port 5000?

-Darius

On Wed, May 12, 2010 at 12:28 PM, firzhan naqash <[hidden email]> wrote:
Ben:

No. When I clicked the debug button in the Debug dialog box it starts to throw the error message -  "Failed to connect to remote VM. Connection refused.  Connection refused".

I just reinstalled the tomcat manager and now I am trying to run the unit test.

On Thu, May 13, 2010 at 12:47 AM, Ben Wolfe <[hidden email]> wrote:
Are you able to do debugging and break points in trunk via instrcutions here? I added one more section for module debugging...its just adding the your module's project to the "Source" tab in the Debug dialog box.

Ben


On 05/12/2010 12:37 PM, Jaime Hablutzel Egoavil wrote:
Not sure, but maybe you should place JAVA_OPTS outside that conditional.


  1.
     if [ -z "$JAVA_OPTS" ]; then
  2.

              JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -Xms512m
     -XX:PermSize=256m  -XX:MaxPermSize=256m  -XX:NewSize=128m  -Xdebug
     -Xnoagent
     -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000"
  3.

     fi


Then, before trying to connect eclipse to tomcat for debugging make a
telnet to localhost

telnet localhost 5000

If it works then check you eclipse configuration at remote java application



2010/5/12 firzhan naqash <[hidden email]
<mailto:[hidden email]>>


   Hi folks,

   I am still having the problem. I did all the configurations
   mentioned on the wiki page.

   But it still throws the error - "Failed to connect to remote VM.
   Connection refused.  Connection refused".

   I have pastebin the /etc/init.d/tomcat file
   http://pastebin.com/ATkCwPdY.

   I am using the tomcat manager.

   Any assistances ???

   2010/5/12 BlackKnight <[hidden email]
   <mailto:[hidden email]>>


       Thank you Ribeka, that solves my problem.


       Best Regards
       Dawang

       Nyoman Ribeka 写道:
        > Debugging module is pretty much like debugging core api dawang.
        >
        > http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide
        >
        > But instead giving the core project in the debug
       configuration, you give
        > the module project.
        >
        > Hope it helps.
        >
        > On 05/11/2010 10:31 PM, BlackKnight wrote:
        >
        >> Hi, folks,
        >>
        >> Is there a good way to debug a module?
        >>
        >> I've learnt how to debug the api/web. I've also tried module
       unit test,
        >> which's very helpful but still sometimes I hope to track
       into the module
        >> from the api.
        >>
        >> Any comments?
        >>
        >> Thanks~~
        >>
        >> Dawang
        >>
        >> _________________________________________
        >>
        >> To unsubscribe from OpenMRS Developers' mailing list, send
       an e-mail to [hidden email]
       <mailto:[hidden email]> with "SIGNOFF

       openmrs-devel-l" in the  body (not the subject) of your e-mail.
        >>
        >> [mailto:[hidden email]
       <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
        >>
        >
        >

       _________________________________________

       To unsubscribe from OpenMRS Developers' mailing list, send an
       e-mail to [hidden email]
       <mailto:[hidden email]> with "SIGNOFF

       openmrs-devel-l" in the  body (not the subject) of your e-mail.

       [mailto:[hidden email]
       <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]




   --
   With Regards

   firzhan

   Skype :- firzhan007
   Aim :- firzhanrcfi
   ------------------------------------------------------------------------
   Click here to unsubscribe
   <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l>
   from OpenMRS Developers' mailing list




--
Jaime Hablutzel

(tildes omitidas intencionalmente)
------------------------------------------------------------------------
Click here to unsubscribe
<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]



--
With Regards

firzhan

Skype :- firzhan007
Aim :- firzhanrcfi

[hidden email] from OpenMRS Developers' mailing list


[hidden email] from OpenMRS Developers' mailing list
firzhan firzhan
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a module?

Hi darius,

Here is my /etc/init.d/tomcat file  http://pastebin.com/ATkCwPdY.

I think I have done all the necessary configurations and I have changed the port number in the eclipse Debug dialog box to to 5000 too.


On Thu, May 13, 2010 at 1:00 AM, Darius Jazayeri <[hidden email]> wrote:
Have you modified your tomcat startup properties, and set the eclipse debugger to connect on port 5000?

-Darius

On Wed, May 12, 2010 at 12:28 PM, firzhan naqash <[hidden email]> wrote:
Ben:

No. When I clicked the debug button in the Debug dialog box it starts to throw the error message -  "Failed to connect to remote VM. Connection refused.  Connection refused".

I just reinstalled the tomcat manager and now I am trying to run the unit test.

On Thu, May 13, 2010 at 12:47 AM, Ben Wolfe <[hidden email]> wrote:
Are you able to do debugging and break points in trunk via instrcutions here? I added one more section for module debugging...its just adding the your module's project to the "Source" tab in the Debug dialog box.

Ben


On 05/12/2010 12:37 PM, Jaime Hablutzel Egoavil wrote:
Not sure, but maybe you should place JAVA_OPTS outside that conditional.


  1.
     if [ -z "$JAVA_OPTS" ]; then
  2.

              JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -Xms512m
     -XX:PermSize=256m  -XX:MaxPermSize=256m  -XX:NewSize=128m  -Xdebug
     -Xnoagent
     -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000"
  3.

     fi


Then, before trying to connect eclipse to tomcat for debugging make a
telnet to localhost

telnet localhost 5000

If it works then check you eclipse configuration at remote java application



2010/5/12 firzhan naqash <[hidden email]
<mailto:[hidden email]>>


   Hi folks,

   I am still having the problem. I did all the configurations
   mentioned on the wiki page.

   But it still throws the error - "Failed to connect to remote VM.
   Connection refused.  Connection refused".

   I have pastebin the /etc/init.d/tomcat file
   http://pastebin.com/ATkCwPdY.

   I am using the tomcat manager.

   Any assistances ???

   2010/5/12 BlackKnight <[hidden email]
   <mailto:[hidden email]>>


       Thank you Ribeka, that solves my problem.


       Best Regards
       Dawang

       Nyoman Ribeka 写道:
        > Debugging module is pretty much like debugging core api dawang.
        >
        > http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide
        >
        > But instead giving the core project in the debug
       configuration, you give
        > the module project.
        >
        > Hope it helps.
        >
        > On 05/11/2010 10:31 PM, BlackKnight wrote:
        >
        >> Hi, folks,
        >>
        >> Is there a good way to debug a module?
        >>
        >> I've learnt how to debug the api/web. I've also tried module
       unit test,
        >> which's very helpful but still sometimes I hope to track
       into the module
        >> from the api.
        >>
        >> Any comments?
        >>
        >> Thanks~~
        >>
        >> Dawang
        >>
        >> _________________________________________
        >>
        >> To unsubscribe from OpenMRS Developers' mailing list, send
       an e-mail to [hidden email]
       <mailto:[hidden email]> with "SIGNOFF

       openmrs-devel-l" in the  body (not the subject) of your e-mail.
        >>
        >> [mailto:[hidden email]
       <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
        >>
        >
        >

       _________________________________________

       To unsubscribe from OpenMRS Developers' mailing list, send an
       e-mail to [hidden email]
       <mailto:[hidden email]> with "SIGNOFF

       openmrs-devel-l" in the  body (not the subject) of your e-mail.

       [mailto:[hidden email]
       <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]




   --
   With Regards

   firzhan

   Skype :- firzhan007
   Aim :- firzhanrcfi
   ------------------------------------------------------------------------
   Click here to unsubscribe
   <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l>
   from OpenMRS Developers' mailing list




--
Jaime Hablutzel

(tildes omitidas intencionalmente)
------------------------------------------------------------------------
Click here to unsubscribe
<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]



--
With Regards

firzhan

Skype :- firzhan007
Aim :- firzhanrcfi

[hidden email] from OpenMRS Developers' mailing list


[hidden email] from OpenMRS Developers' mailing list



--
With Regards

firzhan

Skype :- firzhan007
Aim :- firzhanrcfi

[hidden email] from OpenMRS Developers' mailing list
Harsha.cse Harsha.cse
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a module?

hi Firzan

I was debugging the modules too without any issue. Few hints

Start tomcat in debug mode : ./catalina.sh debug or ./catalina.sh jpda start
Attach the module source in debug configuration under Remote Java App
Make sure the port and host to be tomcat's listening port and host
It should connect to the remote VM now
Thats it

Cheers
Harsha





On Thu, May 13, 2010 at 8:00 AM, firzhan naqash <[hidden email]> wrote:
Hi darius,

Here is my /etc/init.d/tomcat file  http://pastebin.com/ATkCwPdY.

I think I have done all the necessary configurations and I have changed the port number in the eclipse Debug dialog box to to 5000 too.



On Thu, May 13, 2010 at 1:00 AM, Darius Jazayeri <[hidden email]> wrote:
Have you modified your tomcat startup properties, and set the eclipse debugger to connect on port 5000?

-Darius

On Wed, May 12, 2010 at 12:28 PM, firzhan naqash <[hidden email]> wrote:
Ben:

No. When I clicked the debug button in the Debug dialog box it starts to throw the error message -  "Failed to connect to remote VM. Connection refused.  Connection refused".

I just reinstalled the tomcat manager and now I am trying to run the unit test.

On Thu, May 13, 2010 at 12:47 AM, Ben Wolfe <[hidden email]> wrote:
Are you able to do debugging and break points in trunk via instrcutions here? I added one more section for module debugging...its just adding the your module's project to the "Source" tab in the Debug dialog box.

Ben


On 05/12/2010 12:37 PM, Jaime Hablutzel Egoavil wrote:
Not sure, but maybe you should place JAVA_OPTS outside that conditional.


  1.
     if [ -z "$JAVA_OPTS" ]; then
  2.

              JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -Xms512m
     -XX:PermSize=256m  -XX:MaxPermSize=256m  -XX:NewSize=128m  -Xdebug
     -Xnoagent
     -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000"
  3.

     fi


Then, before trying to connect eclipse to tomcat for debugging make a
telnet to localhost

telnet localhost 5000

If it works then check you eclipse configuration at remote java application



2010/5/12 firzhan naqash <[hidden email]
<mailto:[hidden email]>>


   Hi folks,

   I am still having the problem. I did all the configurations
   mentioned on the wiki page.

   But it still throws the error - "Failed to connect to remote VM.
   Connection refused.  Connection refused".

   I have pastebin the /etc/init.d/tomcat file
   http://pastebin.com/ATkCwPdY.

   I am using the tomcat manager.

   Any assistances ???

   2010/5/12 BlackKnight <[hidden email]
   <mailto:[hidden email]>>


       Thank you Ribeka, that solves my problem.


       Best Regards
       Dawang

       Nyoman Ribeka 写道:
        > Debugging module is pretty much like debugging core api dawang.
        >
        > http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide
        >
        > But instead giving the core project in the debug
       configuration, you give
        > the module project.
        >
        > Hope it helps.
        >
        > On 05/11/2010 10:31 PM, BlackKnight wrote:
        >
        >> Hi, folks,
        >>
        >> Is there a good way to debug a module?
        >>
        >> I've learnt how to debug the api/web. I've also tried module
       unit test,
        >> which's very helpful but still sometimes I hope to track
       into the module
        >> from the api.
        >>
        >> Any comments?
        >>
        >> Thanks~~
        >>
        >> Dawang
        >>
        >> _________________________________________
        >>
        >> To unsubscribe from OpenMRS Developers' mailing list, send
       an e-mail to [hidden email]
       <mailto:[hidden email]> with "SIGNOFF

       openmrs-devel-l" in the  body (not the subject) of your e-mail.
        >>
        >> [mailto:[hidden email]
       <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
        >>
        >
        >

       _________________________________________

       To unsubscribe from OpenMRS Developers' mailing list, send an
       e-mail to [hidden email]
       <mailto:[hidden email]> with "SIGNOFF

       openmrs-devel-l" in the  body (not the subject) of your e-mail.

       [mailto:[hidden email]
       <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]




   --
   With Regards

   firzhan

   Skype :- firzhan007
   Aim :- firzhanrcfi
   ------------------------------------------------------------------------
   Click here to unsubscribe
   <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l>
   from OpenMRS Developers' mailing list




--
Jaime Hablutzel

(tildes omitidas intencionalmente)
------------------------------------------------------------------------
Click here to unsubscribe
<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]



--
With Regards

firzhan

Skype :- firzhan007
Aim :- firzhanrcfi

[hidden email] from OpenMRS Developers' mailing list


[hidden email] from OpenMRS Developers' mailing list



--
With Regards

firzhan

Skype :- firzhan007
Aim :- firzhanrcfi

[hidden email] from OpenMRS Developers' mailing list


[hidden email] from OpenMRS Developers' mailing list
firzhan firzhan
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a module?

Hi Harsha,

Thanks for your hints.

I did the same changes in to the /etc/default/tomcat6 the debugging process is working without any issues. :)

Thanks for all your suggestions

On Thu, May 13, 2010 at 7:57 AM, Harsha <[hidden email]> wrote:
hi Firzan

I was debugging the modules too without any issue. Few hints

Start tomcat in debug mode : ./catalina.sh debug or ./catalina.sh jpda start
Attach the module source in debug configuration under Remote Java App
Make sure the port and host to be tomcat's listening port and host
It should connect to the remote VM now
Thats it

Cheers
Harsha






On Thu, May 13, 2010 at 8:00 AM, firzhan naqash <[hidden email]> wrote:
Hi darius,

Here is my /etc/init.d/tomcat file  http://pastebin.com/ATkCwPdY.

I think I have done all the necessary configurations and I have changed the port number in the eclipse Debug dialog box to to 5000 too.



On Thu, May 13, 2010 at 1:00 AM, Darius Jazayeri <[hidden email]> wrote:
Have you modified your tomcat startup properties, and set the eclipse debugger to connect on port 5000?

-Darius

On Wed, May 12, 2010 at 12:28 PM, firzhan naqash <[hidden email]> wrote:
Ben:

No. When I clicked the debug button in the Debug dialog box it starts to throw the error message -  "Failed to connect to remote VM. Connection refused.  Connection refused".

I just reinstalled the tomcat manager and now I am trying to run the unit test.

On Thu, May 13, 2010 at 12:47 AM, Ben Wolfe <[hidden email]> wrote:
Are you able to do debugging and break points in trunk via instrcutions here? I added one more section for module debugging...its just adding the your module's project to the "Source" tab in the Debug dialog box.

Ben


On 05/12/2010 12:37 PM, Jaime Hablutzel Egoavil wrote:
Not sure, but maybe you should place JAVA_OPTS outside that conditional.


  1.
     if [ -z "$JAVA_OPTS" ]; then
  2.

              JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -Xms512m
     -XX:PermSize=256m  -XX:MaxPermSize=256m  -XX:NewSize=128m  -Xdebug
     -Xnoagent
     -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000"
  3.

     fi


Then, before trying to connect eclipse to tomcat for debugging make a
telnet to localhost

telnet localhost 5000

If it works then check you eclipse configuration at remote java application



2010/5/12 firzhan naqash <[hidden email]
<mailto:[hidden email]>>


   Hi folks,

   I am still having the problem. I did all the configurations
   mentioned on the wiki page.

   But it still throws the error - "Failed to connect to remote VM.
   Connection refused.  Connection refused".

   I have pastebin the /etc/init.d/tomcat file
   http://pastebin.com/ATkCwPdY.

   I am using the tomcat manager.

   Any assistances ???

   2010/5/12 BlackKnight <[hidden email]
   <mailto:[hidden email]>>


       Thank you Ribeka, that solves my problem.


       Best Regards
       Dawang

       Nyoman Ribeka 写道:
        > Debugging module is pretty much like debugging core api dawang.
        >
        > http://openmrs.org/wiki/Developer_How-To_Use_Eclipse_Guide
        >
        > But instead giving the core project in the debug
       configuration, you give
        > the module project.
        >
        > Hope it helps.
        >
        > On 05/11/2010 10:31 PM, BlackKnight wrote:
        >
        >> Hi, folks,
        >>
        >> Is there a good way to debug a module?
        >>
        >> I've learnt how to debug the api/web. I've also tried module
       unit test,
        >> which's very helpful but still sometimes I hope to track
       into the module
        >> from the api.
        >>
        >> Any comments?
        >>
        >> Thanks~~
        >>
        >> Dawang
        >>
        >> _________________________________________
        >>
        >> To unsubscribe from OpenMRS Developers' mailing list, send
       an e-mail to [hidden email]
       <mailto:[hidden email]> with "SIGNOFF

       openmrs-devel-l" in the  body (not the subject) of your e-mail.
        >>
        >> [mailto:[hidden email]
       <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
        >>
        >
        >

       _________________________________________

       To unsubscribe from OpenMRS Developers' mailing list, send an
       e-mail to [hidden email]
       <mailto:[hidden email]> with "SIGNOFF

       openmrs-devel-l" in the  body (not the subject) of your e-mail.

       [mailto:[hidden email]
       <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]




   --
   With Regards

   firzhan

   Skype :- firzhan007
   Aim :- firzhanrcfi
   ------------------------------------------------------------------------
   Click here to unsubscribe
   <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l>
   from OpenMRS Developers' mailing list




--
Jaime Hablutzel

(tildes omitidas intencionalmente)
------------------------------------------------------------------------
Click here to unsubscribe
<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]



--
With Regards

firzhan

Skype :- firzhan007
Aim :- firzhanrcfi

[hidden email] from OpenMRS Developers' mailing list


[hidden email] from OpenMRS Developers' mailing list



--
With Regards

firzhan

Skype :- firzhan007
Aim :- firzhanrcfi

[hidden email] from OpenMRS Developers' mailing list


[hidden email] from OpenMRS Developers' mailing list



--
With Regards

firzhan

Skype :- firzhan007
Aim :- firzhanrcfi

[hidden email] from OpenMRS Developers' mailing list