0

When I debugged in C# with Visual Studios, I attached the debugger to a process and found that really helpful.

I was wondering if it was possible to attach a process using Eclipse (Java version). It would make debugging much simpler especially when the entire application is not local meaning I am just writing additional features that is going to be ran by the already developed application.

dalawh
  • 886
  • 8
  • 15
  • 37
  • 2
    Yes, Eclipse has a debugger, and yes, it can attach to a process which is already running. That process will have to be set up to accept incoming debug connections though. Look yourself up a tutorial online, there are plenty :) – Matt Ball Dec 14 '13 at 19:34
  • @MattBall I found a few, but the ones I found all require me to have access to the external VM. Haven't found any that allows me to debug my local code that is being ran on an application. I will keep searching, hopefully I find something. – dalawh Dec 14 '13 at 19:45
  • Are you running the code from inside of Eclipse? – Matt Ball Dec 14 '13 at 19:49
  • @MattBall Nope. I am running the code through an application, which is why I want to attach the debugger to the process (application), so that it will stop at a breakpoint when the process gets to it. – dalawh Dec 14 '13 at 19:50
  • However you start the external JVM, [run it in debug mode.](http://stackoverflow.com/a/173447/139010) – Matt Ball Dec 14 '13 at 20:00
  • @MattBall I don't have access to the external JVM. I am only developing a feature that will be ran by the application. Think of it like group A makes an application that comes with an API for other people to create additional features to their application. Group B (which includes me) use their API to develop features. Now once I developed something, I will have to run their application, which runs my feature. I want to attach the Eclipse debugger to that application to debug the bugs. Not sure if I am making much sense. – dalawh Dec 14 '13 at 20:06
  • 1
    You might be looking for http://stackoverflow.com/q/376201/139010 but in general, I'm not sure that Java – let alone Eclipse – has first-class support for that. If you want to debug a JVM you should generally be a Good Citizen and let it know, in advance `:)` – Matt Ball Dec 14 '13 at 20:11

0 Answers0