Friday, June 28, 2024

Re: is it possible to debug GWT projects (breakpoints, step through code etc) ?

& Google Cloud Platform samples for App Engine with Java 11+
github.com/GoogleCloudPlatform/java-docs-samples/tree/main/appengine-java11/appengine-simple-jetty-main which shows how to have a separate jar module which run the WAR using the  java command.
As in the GWT archetype it uses Jetty Maven Plugin for the development server & it covers Eclipse debugging,
appengine-maven-plugin is only for appengine:deploy

On Friday, June 28, 2024 at 2:50:21 PM UTC+1 Daniel Webb wrote:
Hi Thomas,
Aha!! You are correct, thank you - I have added it to my POM and now the breakpoints are getting triggered :-)

Is there a way of limiting this configuration to a specific run configuration, or sometning? The way I have it set up I think the flags are passed every time?

<plugin>

<groupId>com.google.cloud.tools</groupId>

<artifactId>appengine-maven-plugin</artifactId>

<version>2.7.0</version>

<configuration>

<jvmFlags>

<jvmFlag>-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000</jvmFlag>

</jvmFlags>

</configuration>

</plugin>


On Friday 28 June 2024 at 13:34:03 UTC+1 Thomas Broyer wrote:
You need to pass the -agentlib:… as <jvmArgs> of the appengine plugin, as it will fork a new JVM
On Thursday, June 27, 2024 at 7:15:26 PM UTC+2 dw...@cobwebb.com wrote:
Hi,

Can anyone help me get remote jdwp server debugging in Eclipse working? I seem to be able to get a server running but it won't halt on breakpoints.

I run as.. "Maven Build" with goals of 'clean install appengine:run' and vm arguments of '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000'
run debug.png
run debug 2.png

The Console says "Listening for transport dt_socket at address: 8000"

Then I "Debug as..." "Remote Java Application"...
remote debug 1.png

And the console starts up again with the 'clean install appengine:run' finishing up with the usual:
Started NetworkTrafficSelectChannelConnector {HTTP/1.1, (http/1.1)}{localhost:8080}

At which point I can browse to http://localhost:8080 but none of my breakpoints will trigger.

Please, what am I doing wrong? I've not done java remote debugging before :-(
Regards
Daniel


On Thursday 27 June 2024 at 16:21:17 UTC+1 Daniel Webb wrote:
Thanks Ralph, So it's source map debugging in chrome for the client side, jdwp remote debugging for the server side.
  
On Tuesday 25 June 2024 at 14:09:20 UTC+1 Ralph Fiergolla wrote:
Hi! Unless you want to invest time and effort in getting eclipse plugins up and running, I would suggest using your browser's development tools (Ctrl+Shift+I in Chrome/Edge) to debug the client side. Thanks to source maps it will show your JAVA source code when debugging. 
To debug the server side, you need to start your server with "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n" and create a debug configuration to connect to port 8000 in Eclipse.
Good luck
Ralph

On Mon, Jun 24, 2024 at 11:19 AM 'Daniel Webb' via GWT Users <google-we...@googlegroups.com> wrote:
Hi, 
Is it possible to debug GWT projects - setting breakpoints and stepping through code? This would be server and/or client debugging.

We've just had our internal GWT based app updated and it now uses maven to run (clean install appengine:run). The eclipse plugin based debugging technique that I used to use no longer seems to work.

Thanks for any advice, I really like GWT but I'm lost as to how it all works!
Daniel

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/253e328a-484c-4c19-aaf7-e489780c3c0bn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/c30f8481-2b25-4d9c-aebf-8f7d46b7d218n%40googlegroups.com.

Re: is it possible to debug GWT projects (breakpoints, step through code etc) ?

Hi Craig,
Ahh right, so although it's working at the moment with  appengine:run this is being phased out so I'd better be moving to a standalone server.

On Friday 28 June 2024 at 03:19:18 UTC+1 Craig Mitchell wrote:
> Only reason I ask is I've just had the app updated from java 7 because Google dropped support - and the new project uses "appengine:run" for running locally. Should we be doing it differently?

Google are asking everyone to move to the "Second-generation Java runtimes".  https://cloud.google.com/appengine/migration-center/standard/migrate-to-second-gen/java-differences

This also includes upgrading some services, which can be a big task.  I needed to upgrade from using Datastore, to using Firestore in Datastore mode, which was a large amount of code change:  https://cloud.google.com/datastore/docs/firestore-or-datastore

I believe the bundled app engine web server "appengine:run" is now deprecated.  You now need to provide your own web server.  All Google gives you is an installed Java version, and Java libraries to interface with their systems.  How you run them, is now up to you.  Check out the "Framework flexibility" section:  https://cloud.google.com/appengine/migration-center/standard/migrate-to-second-gen/java-differences#framework_flexibility

Disclaimer:  Google has legacy bundled services you can use, and that might include a web server somehow.  I haven't looked too much into it, as I wanted my project to be on the latest, and get off all the legacy stuff.  Plus, once you get off the legacy stuff, you are no longer on Googles proprietary web server and datastore, so moving your app somewhere else becomes a lot easier if you ever needed to.

Shameless self promotion:  I just finished a project for Nasdaq, so I'll be looking for work in the next few weeks, if you needed someone with experience, happy to chat:  https://www.linkedin.com/in/craigmit75/ 

Cheers.

On Friday 28 June 2024 at 1:28:47 am UTC+10 Daniel Webb wrote:
Hi Craig,

On Wednesday 26 June 2024 at 02:56:31 UTC+1 Craig Mitchell wrote:
btw:  "appengine:run" is deprecated.  You won't be able to do any updates to your app until you upgrade.  https://cloud.google.com/appengine/docs/legacy/standard/java/maven-reference  But you probably already knew this.  🙂

Whaat, are you sure?! 
Only reason I ask is I've just had the app updated from java 7 because Google dropped support - and the new project uses "appengine:run" for running locally. Should we be doing it differently?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/c1bbce22-3f86-4fe1-ad26-0a28f919e72cn%40googlegroups.com.

Re: is it possible to debug GWT projects (breakpoints, step through code etc) ?

Thanks for the suggestion Tim, I was really hopeful but I think I'm running in the Debug perspective but the breakpoints are still not triggering :-(

On Thursday 27 June 2024 at 18:35:23 UTC+1 Tim Macpherson wrote:
Did you open the debug view ? iirc in eclipse you need to


On Thu, Jun 27, 2024 at 6:15 PM, 'Daniel Webb' via GWT Users
Hi,

Can anyone help me get remote jdwp server debugging in Eclipse working? I seem to be able to get a server running but it won't halt on breakpoints.

I run as.. "Maven Build" with goals of 'clean install appengine:run' and vm arguments of '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000'
run debug.png
run debug 2.png

The Console says "Listening for transport dt_socket at address: 8000"

Then I "Debug as..." "Remote Java Application"...
remote debug 1.png

And the console starts up again with the 'clean install appengine:run' finishing up with the usual:
Started NetworkTrafficSelectChannelConnector {HTTP/1.1, (http/1.1)}{localhost:8080}

At which point I can browse to http://localhost:8080 but none of my breakpoints will trigger.

Please, what am I doing wrong? I've not done java remote debugging before :-(
Regards
Daniel


On Thursday 27 June 2024 at 16:21:17 UTC+1 Daniel Webb wrote:
Thanks Ralph, So it's source map debugging in chrome for the client side, jdwp remote debugging for the server side.
  
On Tuesday 25 June 2024 at 14:09:20 UTC+1 Ralph Fiergolla wrote:
Hi! Unless you want to invest time and effort in getting eclipse plugins up and running, I would suggest using your browser's development tools (Ctrl+Shift+I in Chrome/Edge) to debug the client side. Thanks to source maps it will show your JAVA source code when debugging. 
To debug the server side, you need to start your server with "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n" and create a debug configuration to connect to port 8000 in Eclipse.
Good luck
Ralph

On Mon, Jun 24, 2024 at 11:19 AM 'Daniel Webb' via GWT Users <google-we...@googlegroups.com> wrote:
Hi, 
Is it possible to debug GWT projects - setting breakpoints and stepping through code? This would be server and/or client debugging.

We've just had our internal GWT based app updated and it now uses maven to run (clean install appengine:run). The eclipse plugin based debugging technique that I used to use no longer seems to work.

Thanks for any advice, I really like GWT but I'm lost as to how it all works!
Daniel

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/253e328a-484c-4c19-aaf7-e489780c3c0bn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion on the web visit

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/13a26a21-b6c3-4339-9818-e4439f66ba43n%40googlegroups.com.

Re: is it possible to debug GWT projects (breakpoints, step through code etc) ?

You need to pass the -agentlib:… as <jvmArgs> of the appengine plugin, as it will fork a new JVM
https://cloud.google.com/appengine/docs/legacy/standard/java/maven-reference#appenginerun

On Thursday, June 27, 2024 at 7:15:26 PM UTC+2 dw...@cobwebb.com wrote:
Hi,

Can anyone help me get remote jdwp server debugging in Eclipse working? I seem to be able to get a server running but it won't halt on breakpoints.

I run as.. "Maven Build" with goals of 'clean install appengine:run' and vm arguments of '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000'
run debug.png
run debug 2.png

The Console says "Listening for transport dt_socket at address: 8000"

Then I "Debug as..." "Remote Java Application"...
remote debug 1.png

And the console starts up again with the 'clean install appengine:run' finishing up with the usual:
Started NetworkTrafficSelectChannelConnector {HTTP/1.1, (http/1.1)}{localhost:8080}

At which point I can browse to http://localhost:8080 but none of my breakpoints will trigger.

Please, what am I doing wrong? I've not done java remote debugging before :-(
Regards
Daniel


On Thursday 27 June 2024 at 16:21:17 UTC+1 Daniel Webb wrote:
Thanks Ralph, So it's source map debugging in chrome for the client side, jdwp remote debugging for the server side.
  
On Tuesday 25 June 2024 at 14:09:20 UTC+1 Ralph Fiergolla wrote:
Hi! Unless you want to invest time and effort in getting eclipse plugins up and running, I would suggest using your browser's development tools (Ctrl+Shift+I in Chrome/Edge) to debug the client side. Thanks to source maps it will show your JAVA source code when debugging. 
To debug the server side, you need to start your server with "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n" and create a debug configuration to connect to port 8000 in Eclipse.
Good luck
Ralph

On Mon, Jun 24, 2024 at 11:19 AM 'Daniel Webb' via GWT Users <google-we...@googlegroups.com> wrote:
Hi, 
Is it possible to debug GWT projects - setting breakpoints and stepping through code? This would be server and/or client debugging.

We've just had our internal GWT based app updated and it now uses maven to run (clean install appengine:run). The eclipse plugin based debugging technique that I used to use no longer seems to work.

Thanks for any advice, I really like GWT but I'm lost as to how it all works!
Daniel

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/253e328a-484c-4c19-aaf7-e489780c3c0bn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/6132df38-5577-4ff8-ba08-1ea5a4edbd24n%40googlegroups.com.

Thursday, June 27, 2024

Re: is it possible to debug GWT projects (breakpoints, step through code etc) ?

> Only reason I ask is I've just had the app updated from java 7 because Google dropped support - and the new project uses "appengine:run" for running locally. Should we be doing it differently?

Google are asking everyone to move to the "Second-generation Java runtimes".  https://cloud.google.com/appengine/migration-center/standard/migrate-to-second-gen/java-differences

This also includes upgrading some services, which can be a big task.  I needed to upgrade from using Datastore, to using Firestore in Datastore mode, which was a large amount of code change:  https://cloud.google.com/datastore/docs/firestore-or-datastore

I believe the bundled app engine web server "appengine:run" is now deprecated.  You now need to provide your own web server.  All Google gives you is an installed Java version, and Java libraries to interface with their systems.  How you run them, is now up to you.  Check out the "Framework flexibility" section:  https://cloud.google.com/appengine/migration-center/standard/migrate-to-second-gen/java-differences#framework_flexibility

Disclaimer:  Google has legacy bundled services you can use, and that might include a web server somehow.  I haven't looked too much into it, as I wanted my project to be on the latest, and get off all the legacy stuff.  Plus, once you get off the legacy stuff, you are no longer on Googles proprietary web server and datastore, so moving your app somewhere else becomes a lot easier if you ever needed to.

Shameless self promotion:  I just finished a project for Nasdaq, so I'll be looking for work in the next few weeks, if you needed someone with experience, happy to chat:  https://www.linkedin.com/in/craigmit75/ 

Cheers.

On Friday 28 June 2024 at 1:28:47 am UTC+10 Daniel Webb wrote:
Hi Craig,

On Wednesday 26 June 2024 at 02:56:31 UTC+1 Craig Mitchell wrote:
btw:  "appengine:run" is deprecated.  You won't be able to do any updates to your app until you upgrade.  https://cloud.google.com/appengine/docs/legacy/standard/java/maven-reference  But you probably already knew this.  🙂

Whaat, are you sure?! 
Only reason I ask is I've just had the app updated from java 7 because Google dropped support - and the new project uses "appengine:run" for running locally. Should we be doing it differently?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/7b7b50aa-4916-4e5a-99f9-b68b259d9ecen%40googlegroups.com.

Re: is it possible to debug GWT projects (breakpoints, step through code etc) ?

Did you open the debug view ? iirc in eclipse you need to


On Thu, Jun 27, 2024 at 6:15 PM, 'Daniel Webb' via GWT Users
<google-web-toolkit@googlegroups.com> wrote:
Hi,

Can anyone help me get remote jdwp server debugging in Eclipse working? I seem to be able to get a server running but it won't halt on breakpoints.

I run as.. "Maven Build" with goals of 'clean install appengine:run' and vm arguments of '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000'
run debug.png
run debug 2.png

The Console says "Listening for transport dt_socket at address: 8000"

Then I "Debug as..." "Remote Java Application"...
remote debug 1.png

And the console starts up again with the 'clean install appengine:run' finishing up with the usual:
Started NetworkTrafficSelectChannelConnector {HTTP/1.1, (http/1.1)}{localhost:8080}

At which point I can browse to http://localhost:8080 but none of my breakpoints will trigger.

Please, what am I doing wrong? I've not done java remote debugging before :-(
Regards
Daniel


On Thursday 27 June 2024 at 16:21:17 UTC+1 Daniel Webb wrote:
Thanks Ralph, So it's source map debugging in chrome for the client side, jdwp remote debugging for the server side.
  
On Tuesday 25 June 2024 at 14:09:20 UTC+1 Ralph Fiergolla wrote:
Hi! Unless you want to invest time and effort in getting eclipse plugins up and running, I would suggest using your browser's development tools (Ctrl+Shift+I in Chrome/Edge) to debug the client side. Thanks to source maps it will show your JAVA source code when debugging. 
To debug the server side, you need to start your server with "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n" and create a debug configuration to connect to port 8000 in Eclipse.
Good luck
Ralph

On Mon, Jun 24, 2024 at 11:19 AM 'Daniel Webb' via GWT Users <google-we...@googlegroups.com> wrote:
Hi, 
Is it possible to debug GWT projects - setting breakpoints and stepping through code? This would be server and/or client debugging.

We've just had our internal GWT based app updated and it now uses maven to run (clean install appengine:run). The eclipse plugin based debugging technique that I used to use no longer seems to work.

Thanks for any advice, I really like GWT but I'm lost as to how it all works!
Daniel

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/253e328a-484c-4c19-aaf7-e489780c3c0bn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-web-toolkit/66677696-106b-42ff-bea4-15bd6984b19an%40googlegroups.com
.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/1579788657.4996109.1719509672381%40mail.yahoo.com.

Re: is it possible to debug GWT projects (breakpoints, step through code etc) ?

Hi Craig,

On Wednesday 26 June 2024 at 02:56:31 UTC+1 Craig Mitchell wrote:
btw:  "appengine:run" is deprecated.  You won't be able to do any updates to your app until you upgrade.  https://cloud.google.com/appengine/docs/legacy/standard/java/maven-reference  But you probably already knew this.  🙂

Whaat, are you sure?! 
Only reason I ask is I've just had the app updated from java 7 because Google dropped support - and the new project uses "appengine:run" for running locally. Should we be doing it differently?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/8020a958-d955-4172-a920-1a70d86245b2n%40googlegroups.com.