[GSOC] Getting the back end to hit a debug break point.

Hi DHIS2,

I am currently working with Mark Polak on a project improve the initial rendering of DHIS2 apps performance buy pre rendering the content in the back end for better UX.

I am currently trying to get IntellJ to hit a break point in the back end to better understand the flow of the back end AppController. Currently I got the app to run with a simple jetty:run war. This does not allow me to debug the app. Then I tried setting MavenOpts and set up remote debugging in intellij. But even though the socket connection was successful it did not hit the break point.

Is there a way to get DHIS2 web/api to get it to hit a break point inside IntelliJ Idea or Eclipse for that matter.

Thanks for the help in advance :).

P.S. I have currently successfully built the back end and set it up with the skeleton-app as well.

···

best regards,

Dehan de Croos

Hi Dehan,

this tutorial might help:

https://www.dhis2.org/tutorials/debugging-java-code-in-eclipse

regards,

Lars

···

On Mon, Jun 27, 2016 at 10:27 AM, Dehan De Croos dehandecroos@gmail.com wrote:

Hi DHIS2,

I am currently working with Mark Polak on a project improve the initial rendering of DHIS2 apps performance buy pre rendering the content in the back end for better UX.

I am currently trying to get IntellJ to hit a break point in the back end to better understand the flow of the back end AppController. Currently I got the app to run with a simple jetty:run war. This does not allow me to debug the app. Then I tried setting MavenOpts and set up remote debugging in intellij. But even though the socket connection was successful it did not hit the break point.

Is there a way to get DHIS2 web/api to get it to hit a break point inside IntelliJ Idea or Eclipse for that matter.

Thanks for the help in advance :).

P.S. I have currently successfully built the back end and set it up with the skeleton-app as well.

best regards,

Dehan de Croos


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Hi Dehan,

The only way I’ve had this work in IntelliJ is to run the maven process with InjtelliJ itself, and not externally. I’m sure you can hook into it externally, but as you I’ve had no luck doing so.

I’m assuming you have the Maven plugin installed in IntelliJ.

To run Maven in IJ:

  • Open the ‘Maven projects’ tab (far right side)
  • In the list of maven projects go to DHIS Web Portal -> Plugins -> jetty
  • Right-click “jetty:run-war” and select “debug dhis-web-portal…”
    The project should start running in an intellij shell (with debugging) now. You could probably do so for the other web modules as well (with jetty:run) but I have not tested this.

Also, since you’re running in IntelliJ you will have to configure maven there: i.e. running with the -Pdev and/or disabling tests. The latter is done with the blue “lightning” button in the Maven projects tab.

Hope that helps!

···

On Mon, Jun 27, 2016 at 11:01 AM, Lars Helge Øverland lars@dhis2.org wrote:

Hi Dehan,

this tutorial might help:

https://www.dhis2.org/tutorials/debugging-java-code-in-eclipse

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Mon, Jun 27, 2016 at 10:27 AM, Dehan De Croos dehandecroos@gmail.com wrote:

Hi DHIS2,

I am currently working with Mark Polak on a project improve the initial rendering of DHIS2 apps performance buy pre rendering the content in the back end for better UX.

I am currently trying to get IntellJ to hit a break point in the back end to better understand the flow of the back end AppController. Currently I got the app to run with a simple jetty:run war. This does not allow me to debug the app. Then I tried setting MavenOpts and set up remote debugging in intellij. But even though the socket connection was successful it did not hit the break point.

Is there a way to get DHIS2 web/api to get it to hit a break point inside IntelliJ Idea or Eclipse for that matter.

Thanks for the help in advance :).

P.S. I have currently successfully built the back end and set it up with the skeleton-app as well.

best regards,

Dehan de Croos


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Halvdan Hoem Grelland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

Hi Lars, Halvdan,
Thanks guys!

and Halvdan thanks especially to you!!!

You the man! :grinning: I’ve got it to halt on my command with your advice!

···

On 27 June 2016 at 16:02, Halvdan Hoem Grelland halvdan@dhis2.org wrote:

Hi Dehan,

The only way I’ve had this work in IntelliJ is to run the maven process with InjtelliJ itself, and not externally. I’m sure you can hook into it externally, but as you I’ve had no luck doing so.

I’m assuming you have the Maven plugin installed in IntelliJ.

To run Maven in IJ:

  • Open the ‘Maven projects’ tab (far right side)
  • In the list of maven projects go to DHIS Web Portal -> Plugins -> jetty
  • Right-click “jetty:run-war” and select “debug dhis-web-portal…”
    The project should start running in an intellij shell (with debugging) now. You could probably do so for the other web modules as well (with jetty:run) but I have not tested this.

Also, since you’re running in IntelliJ you will have to configure maven there: i.e. running with the -Pdev and/or disabling tests. The latter is done with the blue “lightning” button in the Maven projects tab.

Hope that helps!

best regards,

Dehan de Croos

On Mon, Jun 27, 2016 at 11:01 AM, Lars Helge Øverland lars@dhis2.org wrote:

Hi Dehan,

this tutorial might help:

https://www.dhis2.org/tutorials/debugging-java-code-in-eclipse

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Halvdan Hoem Grelland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

On Mon, Jun 27, 2016 at 10:27 AM, Dehan De Croos dehandecroos@gmail.com wrote:

Hi DHIS2,

I am currently working with Mark Polak on a project improve the initial rendering of DHIS2 apps performance buy pre rendering the content in the back end for better UX.

I am currently trying to get IntellJ to hit a break point in the back end to better understand the flow of the back end AppController. Currently I got the app to run with a simple jetty:run war. This does not allow me to debug the app. Then I tried setting MavenOpts and set up remote debugging in intellij. But even though the socket connection was successful it did not hit the break point.

Is there a way to get DHIS2 web/api to get it to hit a break point inside IntelliJ Idea or Eclipse for that matter.

Thanks for the help in advance :).

P.S. I have currently successfully built the back end and set it up with the skeleton-app as well.

best regards,

Dehan de Croos


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Fact: I am the man.

···

On Mon, Jun 27, 2016 at 3:11 PM, Dehan De Croos dehandecroos@gmail.com wrote:

Hi Lars, Halvdan,
Thanks guys!

and Halvdan thanks especially to you!!!

You the man! :grinning: I’ve got it to halt on my command with your advice!

best regards,

Dehan de Croos

On 27 June 2016 at 16:02, Halvdan Hoem Grelland halvdan@dhis2.org wrote:

Hi Dehan,

The only way I’ve had this work in IntelliJ is to run the maven process with InjtelliJ itself, and not externally. I’m sure you can hook into it externally, but as you I’ve had no luck doing so.

I’m assuming you have the Maven plugin installed in IntelliJ.

To run Maven in IJ:

  • Open the ‘Maven projects’ tab (far right side)
  • In the list of maven projects go to DHIS Web Portal -> Plugins -> jetty
  • Right-click “jetty:run-war” and select “debug dhis-web-portal…”
    The project should start running in an intellij shell (with debugging) now. You could probably do so for the other web modules as well (with jetty:run) but I have not tested this.

Also, since you’re running in IntelliJ you will have to configure maven there: i.e. running with the -Pdev and/or disabling tests. The latter is done with the blue “lightning” button in the Maven projects tab.

Hope that helps!

On Mon, Jun 27, 2016 at 11:01 AM, Lars Helge Øverland lars@dhis2.org wrote:

Hi Dehan,

this tutorial might help:

https://www.dhis2.org/tutorials/debugging-java-code-in-eclipse

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Halvdan Hoem Grelland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

On Mon, Jun 27, 2016 at 10:27 AM, Dehan De Croos dehandecroos@gmail.com wrote:

Hi DHIS2,

I am currently working with Mark Polak on a project improve the initial rendering of DHIS2 apps performance buy pre rendering the content in the back end for better UX.

I am currently trying to get IntellJ to hit a break point in the back end to better understand the flow of the back end AppController. Currently I got the app to run with a simple jetty:run war. This does not allow me to debug the app. Then I tried setting MavenOpts and set up remote debugging in intellij. But even though the socket connection was successful it did not hit the break point.

Is there a way to get DHIS2 web/api to get it to hit a break point inside IntelliJ Idea or Eclipse for that matter.

Thanks for the help in advance :).

P.S. I have currently successfully built the back end and set it up with the skeleton-app as well.

best regards,

Dehan de Croos


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Halvdan Hoem Grelland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

Lol. Sorry for re-stating the obvious!

···

On 27 June 2016 at 18:45, Halvdan Hoem Grelland halvdan@dhis2.org wrote:

Fact: I am the man.

best regards,

Dehan de Croos

On Mon, Jun 27, 2016 at 3:11 PM, Dehan De Croos dehandecroos@gmail.com wrote:

Hi Lars, Halvdan,
Thanks guys!

and Halvdan thanks especially to you!!!

You the man! :grinning: I’ve got it to halt on my command with your advice!


Halvdan Hoem Grelland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

best regards,

Dehan de Croos

On 27 June 2016 at 16:02, Halvdan Hoem Grelland halvdan@dhis2.org wrote:

Hi Dehan,

The only way I’ve had this work in IntelliJ is to run the maven process with InjtelliJ itself, and not externally. I’m sure you can hook into it externally, but as you I’ve had no luck doing so.

I’m assuming you have the Maven plugin installed in IntelliJ.

To run Maven in IJ:

  • Open the ‘Maven projects’ tab (far right side)
  • In the list of maven projects go to DHIS Web Portal -> Plugins -> jetty
  • Right-click “jetty:run-war” and select “debug dhis-web-portal…”
    The project should start running in an intellij shell (with debugging) now. You could probably do so for the other web modules as well (with jetty:run) but I have not tested this.

Also, since you’re running in IntelliJ you will have to configure maven there: i.e. running with the -Pdev and/or disabling tests. The latter is done with the blue “lightning” button in the Maven projects tab.

Hope that helps!

On Mon, Jun 27, 2016 at 11:01 AM, Lars Helge Øverland lars@dhis2.org wrote:

Hi Dehan,

this tutorial might help:

https://www.dhis2.org/tutorials/debugging-java-code-in-eclipse

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Halvdan Hoem Grelland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

On Mon, Jun 27, 2016 at 10:27 AM, Dehan De Croos dehandecroos@gmail.com wrote:

Hi DHIS2,

I am currently working with Mark Polak on a project improve the initial rendering of DHIS2 apps performance buy pre rendering the content in the back end for better UX.

I am currently trying to get IntellJ to hit a break point in the back end to better understand the flow of the back end AppController. Currently I got the app to run with a simple jetty:run war. This does not allow me to debug the app. Then I tried setting MavenOpts and set up remote debugging in intellij. But even though the socket connection was successful it did not hit the break point.

Is there a way to get DHIS2 web/api to get it to hit a break point inside IntelliJ Idea or Eclipse for that matter.

Thanks for the help in advance :).

P.S. I have currently successfully built the back end and set it up with the skeleton-app as well.

best regards,

Dehan de Croos


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org