问题
I'm using the atmosphere framework (https://github.com/Atmosphere/atmosphere) which runs on a jetty server and brings websockets to any browser.
The problem that I'm having is that for some strange reason messages broadcasted to all connected clients only arrive on the webclient running on the same platform as the jetty server. (localhost:8080)
Other clients only recieve their messages (all at once) when the server stops. (ip server:8080)
I'm not sure weither this is an issue with jetty 8/atmopshere/my network. I'm using eclipse with the run-jetty-run plugin.
So my question: is there any way to debug this system/for locating where the problem actually is?
回答1:
you can issue the follwoing command from command prompt. mvnDebug jetty:run-exploded antrun:run Then you wil come to know on which port your jetty is listening to after that go to run->debug configuration from there you can debug your server. In debug configuration you can find the option Remote Java Application here create one new debug configuration for new Remote java Application and also here you can define your new server again mvnDebug jetty:run-exploded now you should see your new port.
来源:https://stackoverflow.com/questions/15600663/debugging-a-jetty-application