I'm trying to do a remote debug session for my GWT app.
I added an entry in the GWT plugin running on a Firefox instance in the remote machine:
Host Name | Code Server
[IP address] [127.0.0.1]
However, I'm am still not able to access the GWT app even though I can ping the IP address with the specific port: 8888
Any ideas?
If I understood you right you're trying to connect your client to the remote server and debug client? I'm always debugging using Eclipse IDE. So:
you run debug mode in your Eclipse.
put in your browser url like
http://remotedomain.com:8888/?gwt.codesvr=127.0.0.1:9997 where
gwt.codesvr is your local(!) machine.
Now, you are able to talk to the remote server, but your client-side code is from inside your machine. You can use all power of the Eclipse to debug.
Hope this will help you.
Related
I have a SpringMvc based application project hosted in Jetty and managed by Maven3. I want debug program in remote server JVM. So, on the server side I set java options to the Jetty server.
-Xdebug -Xrunjdwp:transport=dt_socket,address=10.0.5.60:50019,server=y,suspend=n
Then start the jetty server.
jetty server listening on the debug port
Everything seems fine. Then I config a remote profile in IntelliJ
IntelliJ remote debug profile
And start Debug, console shows
Connected to the target VM, address: '10.0.5.60:50019', transport: 'socket'
Wow, seems good. Bug things always happens, The breakpoints can't stop when I visit the running code. That was strange!
I promise I have logs to show that the break-point code must been exec-ed.
So, any one can give a hint to me? Thanks for ur great help.
Is it possible to setup JBoss server on one machine (PC) and then connect to it from another machine (laptop) ? I want to be able to run/deploy my application on the server on the PC and through Intellij on the laptop debug my code using that JBoss instance on the PC. I'm running a domain version of JBoss. Right now I have both the server and client running on the same machine. I'm not sure how to get around doing it, thanks for any help.
Yes it is possible to remote debug your application.
If you look at the first lines in the startup script standalone.[sh|bat], you'll see that debug agent can be enabled with the --debug command switch.
Switching this debug option will enable the JPDA and will listen on port 8787 by default.
This can also be achieved using JAVA_OPTS (look at the end of standalone.conf[.bat])
Once you started WildFly, you'll need to add a remote debug configuration in IntelliJ using the IP and port of your server. Here is the official documentation.
For remote deployment, you should have a look at the jboss-cli.
In Eclipse you can connect as follows, I'm sure Intellij must have something similar as well:
Run-> Debug Configuration->Remote Java Application. Here you can define the Host and Port of the application server, irrespective of it's location, be it local or any remote location.
How do I build, deploy and debug standalone java app on remote machine with IDEA ?
I have remote machine with certain hardware device connected to it. I want to develop standalone Java app on my PC, build it locally but the app should be deployed and running on remote machine accessible via SSH. Thus I'll be using Java remote debug.
I've googled extensively but couldn't understand if it's possible to achieve in IDEA (even though IDEA allows to do so for java servlet containers). I tried "Remote SSH External Tools" plugin. I'm not sure what to specify in following dialog (which seems to have bug)
What options do I have ?
If the machine is only reachable via SSH you need to do two things:
Configure your java application for remote debugging
Connect to the application via SSH
This tutorial should get you going: Remote Debug of a Java App Using SSH Tunneling
I'm running a RESTful webservice created in Eclipse Java EE using TomCat 7.0. I test it using a web browser. It will connect over the localhost, but not with the remote IP. It used to work with an IP, and then I moved my project to a Git repository so I could upload it to Github. Now it's not working for an IP. Not really sure what's up.
Any ideas? Firewalls are off too.
Bonus: I also have the small red x error icon on my project. I can't find any errors and it compiles fine and works fine as long as it's localhost. How the heck do I get rid of the x icon?
Edit: Works with a local IP. I was testing this on a college network earlier. Now I'm on a home network. Any comments?
Hope the following article helps :
www.sitepoint.com/accessing-localhost-from-anywhere
Incase you also have trouble accessing via localhost refer to all the answers for this post:
stackoverflow.com/questions/2280064/tomcat-started-in-eclipse-but-unable-to-connect-to-http-localhost8085
The question is missing many details like logs.. url and configuration for tomcat to give you a specific answer
I have the following configuration in the eclipse
Created a tomcat 7.0 server instance from the servers view.
Created a sample web application and deployed in the server through maven-tomcat-plugin and tested it in the browser ( started the server by right
clicking the server from the server view and selected start )
Tried to configure the remote debugging settings in the created server instance using JPDA options,i added the env variables in the server setting.
i could not connect the debugger to the server when i start the server from the eclipse as like previously.
But it connected seamlessly when i start the directly from the installation directory using the command prompt as like
catlina.bat jpda start
After that i tried this I started the server instance by ( started the server by right clicking the server from the server view and selected DEBUG mode)
I got the Break points in the code and even Hot Code replacement
working!!!
Can anyone explain the following?
What goes wrong when i tried jpda options for the remote debugging with the created server instance in the eclipse?
How the debug option and Hot Code replacement works with the server instance?Is this remote debugging or something else?Can you explain on this one?
the eclipse tomcat plugin spawns a separate JVM while running, you can confirm that in the windows task list, using ps in unix like systems or using visualVM.
That VM is launched in debug mode with the JPDA parameters set by the plugin itself, and that is how the debugging mechanism works, it's based on the JVM functionality. You can confirm which jpda parameters are used by using visual VM, that comes with the JDK.
I don't think you can override the JPDA parameters that the eclipse plugin setted for you, that's why in point 1) it did not work. For 2) it works via remote debugging made transparent by automatic setting the parameters and connecting the remote debugger once the server starts.