Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-debug-dev] Debugging one jvm with multiple targets

Darin,

Thanks for your answer. The debug target in my "custom debugger" is an implementation of IJavaDebugTarget. It is similar to JDIDebugTarget, however is much simpler, since there is only one kind of breakpoint (and a single breakpoint instance if any), no hot-code replacement, no filters, no conditions, one data type etc. Is this what you would call "a proxy to an IJavaDebugTarget"? Where could I read more about "proxying IJavaDebugTarget"?

ILaunch does accept multiple debug targets, are they intended to be for different jvm's?

Thanks!

Xsu

On Wed, Apr 23, 2008 at 3:35 PM, Darin Wright <Darin_Wright@xxxxxxxxxx> wrote:
Hello,

>
> I would appreciate your design input on the following use case. A
> custom java debugger changes the presentation in Debug, Breakpoint,
> Variables view and source display (the debugged process is shown
> graphically on a GEF-like canvas editor).

I don't quite understand your existing design. Do you have an
implementation of (1) a debugger that talks JDI to a JVM, or do you have
an implementation of (2) a debugger that is a proxy to an
IJavaDebugTarget?

> In addition, it should
> support regular java debug for the java classes "embedded" into the
> canvas. This debug process should be a continuous process, which
> switches between java and graphical editors as needed.
> What would be a design pattern for this? The custom debugger is set
> using its own CustomDebugTarget. Shall java debugger be attached to
> the same jvm by adding a JDIDebugTarget to the debug launch?
>

If your implementation is (1), then I think there will be problems - as
only one client can connect via JDI/JDWP to a VM's debug interface at a
time. I'm not sure how hard it would be to disconnect your client and
connect the JDT client. Perhaps it could be done.

If your implementation is (2), then you might experiment with the
following. Assume your ILaunch starts out containing an instance of your
"CutsomDebugTarget" (which is a proxy to an IJavaDebugTarget). When you
want to switch to the "Java" view of things you could try removing the
"CustomDebugTarget" from the launch, and adding the IJavaDebugTarget. This
would change the visible debugger to the standard Java debugger (and
uninstall/install appropriate model proxies to update the view). I've
never tried this, but if feels like it might be a simple solution worth
trying.

Darin Wright

_______________________________________________
platform-debug-dev mailing list
platform-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-debug-dev


Back to the top