- This topic has 19 replies, 6 voices, and was last updated 18 years, 8 months ago by sri_bitla.
-
AuthorPosts
-
IvanMemberI am developing an app using MyEclipse 2.7 on a Windows XP machine, and am deploying to an IBM AS400 iSeries running Tomcat 4.1.29. I would like to be able to remotely debug my app (running on the as400), using the MyEclipse workbench and my local source…
Does MyEclipse support this? If so, how can I do that?
Thanks,
Ivan Hurtado
Senior Architect
Hull & Co.
Scott AndersonParticipantIvan,
Actually Eclipse’s debugger supports hooking up to a remote VM and debugging it. Unfortunately, it’s not something I do very often so I always have to go figure it out again. But basically you can drop down the Eclipse debug menu and select Debug… > Remote Java Application > New and configure the socket settings for the way you launched your remote Tomcat instance with remote debugging enabled. Here’s a link from the Eclipse documentation with more information:
http://www.eclipse.org/documentation/html/plugins/org.eclipse.jdt.doc.user/doc/tasks/tasks-141.htm
John FerronMemberI am running Tomcat 5.0 and am trying to also attach to the server remotely for debugging purposes. For now, the server is running locally on my machine and I would like to use MyEclipse to debug through the code. I tried the steps that you have laid out above, but I got an error stating “Failed to connect to remote VM.” Any ideas on how to resolve this? Thanks for your help.
John
John FerronMemberOh, I am using
Eclipse PlatformVersion: 2.1.2
Build id: 200311030802AND
MyEclipse 2.7
Scott AndersonParticipantJohn,
For debugging on your own machine, you don’t need to mess with any of this. Simply configure the MyEclipse Tomcat 5 connector at Window > Preferences > MyEclipse > Application Servers > Tomcat 5. Once that’s done you’ll be able to deploy your application and debug without worrying about launch configurations simply by using our server tools to start the server.
John FerronMemberScott,
I know that the IDE has that functionality to do that and I’m not doubting that as an option, I actually have it setup that way right now. But I find that when doing that, the view is VERY clustered and hard sometimes to do debugging. If that is my only option, then I guess I’m stuck. But I would REALLY like to have the ide separate from the server for now anyway to help speed up my development.
Right now, I’m using port 80 so I don’t have to type the port in the URL and I am using 1.4.2 of java. If you need any other info, feel free to ask.
John
Riyad KallaMemberthe view is VERY clustered and hard sometimes to do debugging.
I’m not sure I understand this… wether you debug directly from the IDE or connect remotely, its the same interface: the debug perspective… can you clarify what you mean?
Scott AndersonParticipantJohn,
But I find that when doing that, the view is VERY clustered and hard sometimes to do debugging.
You may already know this, but you can configure the perspectives to have any views you want (or don’t want) arranged however you like them. Once you have what you like, you can even save that perspective configuration as a new one that you can then reuse just like the builtins. So, if you find the default Debug perspective too cluttered you can simply close the views you don’t want and rearrange the ones you do in any way that suites your preferences. Does this help?
John FerronMemberScott,
I guess that I’m just use to having the ide separate from the server… (This is how I had it setup with I was coding with JBuilder and Weblogic server) I guess I’d rather have more view of the processes and the code separate from the messages that the server is sending me. I just found it much easier that way. If you could still help me configure it that way in which they are separate.. it’d be great. I guess my next question to you is, what if i wanted to attach to our test env, (not local or production) and wanted to debug that? There I would have to attach remotely to the app server in which i would have to goto the debug feature under the Run tab and configure it that way.
John
Scott AndersonParticipantI guess that I’m just use to having the ide separate from the server… (This is how I had it setup with I was coding with JBuilder and Weblogic server)
The server runs in its own JVM, so in reality is is separate.
I guess I’d rather have more view of the processes and the code separate from the messages that the server is sending me. I just found it much easier that way. If you could still help me configure it that way in which they are separate.. it’d be great.
OK, then try this. Go to Window > New Window. In the new window open the Debug perspective and close all views except the Console. Double-click on the title bar of the Console to maximize it. In your original window, close the Console view. Now you have one window for debugging and one for server messages. Does that give you more the separation you’re used to?
I guess my next question to you is, what if i wanted to attach to our test env, (not local or production) and wanted to debug that? There I would have to attach remotely to the app server in which i would have to goto the debug feature under the Run tab and configure it that way.
For debugging something that is started outside of Eclipse, you then need to do the remote debugging / attach thing that this thread started with. 🙂
John FerronMemberFor debugging something that is started outside of Eclipse, you then need to do the remote debugging / attach thing that this thread started with.
Look back at the third posting that I had put.. that is what I had specifically asked you on. I tried doing the steps to that and I’m still getting an error. Is there something in the server.xml for tomcat 5 that I have to have configured correctly because MyEclipse is NOT connecting. This whole time, all i’ve wanted to do is to attach remote to the server.. no matter if it was on a different machine or on my machine. Do you know of any way to resolve the error that i’m getting. In my server.xml. the port is 80 and the addy is localhost. Any ideas??
John
John FerronMemberI figured it out… next time… refer anyone to this link.. its tells them what to.. they have to alter the catalina.bat file
Scott AndersonParticipantJohn,
Thanks for the followup and the link. Sorry for the misunderstanding. 🙂
Riyad KallaMemberJohn I’m going to add this to the FAQ, thanks again.
IvanMemberHi guys! I am the originator of this thread and I have an update/follow up Re: the issue in my first post….
I finally seem to be able to connect my Eclipse IDE to the JVM running on the remote AS400 server (with Tomcat 4.1.29). I start Tomcat on the server (on port 8080 as per the server.xml file) and set Catalina to enable jpda debugging on port 8000. I have defined my remote connection in Eclipse to my remote host on port 8000 (where jpda is communicating) and when I press “Debug” in Eclipse, it does seem to connect.
Here’s where my current problem comes in…
Then I open my IE Browser and hit my app (running on port 8080 of the as400) as follows:
http://myHost:8080/MyApp/form/login.jspMy app successfully loads the page. However, I have breakpoints setup in Eclipse and I expected the app to
hook into the IDE when I hit the breakpoints so that I can step through & debug, but it does not do this. So in short, it appears that I am connecting to the remote JVM but not hooking/debugging into the app.Any ideas?
Thanks,
Ivan -
AuthorPosts