Community
Participate
Working Groups
code fro HEAD Currently when you create a debug target all of the initialization of the target is done in the constructor, which can be a good amount of work. We should look into performing all of the initialization outside of the constructor - perhaps in an explicit call to initialize() or start().
I was looking at this issue and realized there is another solution. If you derive a class FooDebugTarget from JavaScriptDebugTarget then override initialize(): public synchronized void initialize() { // delay these operations } public synchronized void completeInitiailize() { super.initialize(); } then you can change or delay the call to the base class initialize(). In my case this was needed because my eventRequestManager wants to know the debug target, but the initialize() call uses the eventRequestManager. By creating the DebugTarget, then calling the completeInitialize() the eventRequestManager can be properly set up. This may well be an adequate solution for this issue.
(In reply to comment #1) > > This may well be an adequate solution for this issue. It is a good place to start. Although I still think there could be value in delaying the initialization in general so that other clients would not have to create their own target sub-classes.