Thread: [Pydev-users] [Users] Remote Debugging and Remote System Explorer
Brought to you by:
fabioz
From: SourceForge.net <no...@so...> - 2011-08-05 16:42:47
|
The following forum message was posted by mpietrek at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4641556: Hey all, I'm a relatively new Pydev user, just starting a few months back. I'm looking for some validation on whether I'm on the right track here. My scenario: I've got some Linux servers running in VMs. These servers have various python projects that I need to edit/debug, etc... Ordinarily I'd just run Eclipse/Pydev locally and life would be good. However, when working from home via VPN, X-Windows is completely unusable - The latency is just too high. To remedy this, I've installed Eclipse/Pydev on my workstation (Mac OS Snow Leopard). I've also installed the Remote System Explorer Plugin and using the SSH connector can see and edit projects remotely on the Linux VMs. So far, so good. However, remote debugging on the Linux systems has proved to be more or a challenge. I understand and accept that I need to add a reference and use pydevd from my source. I've had some limited success in that I can see in my Mac Eclipse instance that the process has debug-attached, and that I can step/run the remote app - just not with source debugging. Each time I step, the Eclipse debugger indicates that it can't find the source file. Thus the first question: 1) How do I get the Eclipse debugger to point at the remote machine sources? I can obviously see and edit these sources via RSE, it's just that the debugger seems unaware of them. I've noticed that there's a Pydev "Debug | source locater" dialog, but it implies that the sources are in both locations. I don't have the source locally - They're only on the remote system. What's the preferred way of working with this situation? Question 2: When starting/restarting a new process instance for debugging, is there a way to launch the python app *easily* from within the IDE, or do I need to switch to a shell on the remote machine and launch it manually? Thanks much for any help. I've searched long and hard for answers and while I see some related answers, none seem to address my specific questions. Matt |
From: SourceForge.net <no...@so...> - 2011-08-05 23:31:04
|
The following forum message was posted by fabioz at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4641556: Hi there, first let me say that I haven't actually used the remote system explorer myself, so, I may be wrong on some answer -- but I do know PyDev pretty well :) For the remote debugging, the way it's implemented right now, you do need to have access to sources locally. I guess this could be done better if it knew you're in the remote system explorer, but right now PyDev knows nothing about this (so, you do need sources locally) -- so, unfortunately, right now, the best advice I can give you is using pdb in this situation :( I think PyDev could be improved so that the debugger asks for the source to the remote backend if it can't find it (please open a feature request for that). As for the 2nd question, the same goes here, as PyDev is oblivious of the remote system explorer, it can't launch it (although maybe you could ask to the remote system explorer guys if they have a way to make it work). Cheers, Fabio |
From: SourceForge.net <no...@so...> - 2011-08-05 23:52:39
|
The following forum message was posted by mpietrek at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4641556: Thanks Fabio. I appreciate the answer. The important thing is that I now know what' possible or not possible so that I can stop banging my head against this particular wall. As I'm understanding it, Remote System Explorer (RSE) seems to be the defacto default way of interacting with remote systems. As such, I was hoping there'd be at least some minimal awareness, especially since PyDev supports remote debugging. It sounds from your response that most people develop their project locally, and then when they need to deploy, push the sources to the remote box and fire up remote debugging as necessary. In this case it would make sense that you'd have two source trees kept in sync. I guess I'm spoiled coming from the Microsoft remote debugging world. There, they have the notion of the "source server". When the debugger can't find a source file it asks the server for it, and if returned by the server, the debugger caches it locally. Timestamps and other tricks keep everything up to date. The end result is that remote debugging is very seamless if configured properly. I'll fill feature requests for RSE support. Thanks, Matt |