Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] can somebody explain to me the 2 IDbgpTermination and IDbgpTerminationListener

Johan Compagner wrote:
ok i found all the problems
Any objections that the DbgpTerminateOperation doesnt use a job but immediately calls stop (so yes in the even thread this time) Because if you do it in a job and you just exit eclipse then that job doesnt have to be run at all yet
or the debug engine in eclipse is already terminated..
According to the documentation of the method org.eclipse.debug.core.model.ITerminate#terminate() "Implementations may be blocking or non-blocking".
So we can try to make it blocking and see what happens :-)
Also stop method of DLTKDebugPlugin:

public void stop(BundleContext context) throws Exception {
        HotCodeReplaceManager.getDefault().shutdown();

        super.stop(context);

        ILaunchManager launchManager = DebugPlugin.getDefault()
                .getLaunchManager();
        IDebugTarget[] targets = launchManager.getDebugTargets();
        for (int i = 0; i < targets.length; i++) {
            IDebugTarget target = targets[i];
            if (target instanceof ScriptDebugTarget) {
                ((ScriptDebugTarget) target).shutdown();
            }
        }

        if (dbgpService != null) {
            dbgpService.shutdown();
        }
    }

we first called shutdown on the service and then on the debug targets.

That seems to be the other way around because th debug targes depend on the service.
The dependency from debug targets is only to call unregisterAcceptor(). And there is nothing bad to call it after service shutdown.

The idea to call service shutdown before is to prevent new attachments to occur during shutdown process.
There is no need to change this.

Alex


Back to the top