Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-debug-dev] Which came first: the launch, the debug target, or the process?


Currently, the debug launch story does not specify a strict lifecycle of launch objects. That is, there is no specification of when a launch object is created, and when a debug target is added to that launch, or if a debug target can exist before its corresponding launch, etc. This can be problematic, as debug event listeners may receive event notification for a target or process that is not registered with a launch object yet (making it hard for clients to identify debug targets).

To make the launch process better specified (and more predictable), the debug team proposes the following:
(1) An empty launch object will be created by a launch configuration when its launch method is called (since there is only one shared implementation of ILaunchConfiguration, all clients inherit this behavoir for free). The launch is empty in the sense that it does not contain any debug targets or system processes at this point.
(2) The launch object will be seeded to point to the associated launch configuration being launched
(3) The launch object will be registered with the debug plug-in
(4) The launch object will be passed to the configuration's associated delegate to perform the actual launch.
(5) The delegate will launch/create processes and debug targets and ADD them to the provided (already existing) launch object

To make java launching more predictable, the debug team proposes the following
(1) A java debug target constructor/factory method should provide the launch object with which to associate the target - this way a debug target will always be contained in a launch, and will be identifiable via its launch object or lanuch configuration.

This change will require a breaking API change - launch config delegates will need to accept a launch object as an argument, rather than returning a launch object. As well, the creation of java debug targets will require a launch object.

Please comment ASAP if you have concerns, as we want to get this change into the Milestone 5 release.

Thanks,

Darin

Back to the top