Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Re: dltk-dev Digest, Vol 6, Issue 21

Hi Joy,

I understand your problem and think that you should use AbstractDebugView  as base class for your debug view. This base class contains many useful methods related to all debug views, and seems it contains code responsible to view visibility. I don't know exactly because I didn't use this class for myself but I think it helps you. Please, write if problem would be resolved.

About second question. Possibly it can be a bug in DLTK because one thread should execute only one statement at the same time. Please, if possible, post a bug in Eclipse Bugzilla with detailed description of your situation.

You cannot explicitly set step button to "disabled" because it's the responsibility of debug framework.

--
Dmitriy Kovalev

On 8/22/07, wang dada <runtoac@xxxxxxxxx> wrote:

Hello Dmitriy,

You're right that DebugEvent is thrown on every breakpoint.

But my situation is, when debugging a Tcl script, first it will change to the debugging perspective where the custom debug view is located. The custom debug view can not catch the debug event thrown on the first breakpoint, because the debug view is not shown at that time.

If I debug script in the debug perspective at the very beginning, and let the custom debug view shown before debugging, it can catch the debug event.

So your method of using ScriptEvaluationContextManager might have the same problem. Moreover I cannot get the frame, I do not know if the following method is right.

protected Viewer createViewer(Composite parent) {

....

IWorkbenchPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();

IScriptStackFrame f = ScriptEvaluationContextManager.getEvaluationContext(part);

...

}

  f is null.

 

This is one question, I have another question.

If I click step over button too fast, that the execution of the snippet I sent to the Tcl interpreter thread might has not finished yet, I got following errors. I noticed that if I step over a procedure taking some time, say a 10000 times circulation, the step buttons are grayed while the execution. So how can I control the step button to be grayed when the script I send to the Tcl interpreter thread has not finished yet?

 

::engine::Snit_inst1::dbg interrupt called with an app that is not running.
    while executing
"# Compiled -- no source code available
error "called a copy of a compiled script""
    (procedure "::dbgtalk::Snit_methodinterrupt" line 1)
    invoked from within
"::dbgtalk::Snit_methodinterrupt ::dbgtalk ::dbgtalk::Snit_inst1 ::engine::Snit_inst1::dbg ::engine::Snit_inst1::dbg"
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 $command $args"
    invoked from within
"::engine::Snit_inst1::dbg interrupt"
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 $command $args"
    invoked from within
"# Compiled -- no source code available
error "called a copy of a compiled script""
    (procedure "::dbgp::step::Snit_methodDoBreak" line 1)
    invoked from within
"::dbgp::step::Snit_methodDoBreak ::dbgp::step ::dbgp::step::Snit_inst1 ::dbgp::client::Snit_inst1::stepper ::dbgp::client::Snit_inst1::stepper break {..."
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 $command $args"
    invoked from within
"::dbgp::client::Snit_inst1::stepper DoBreak break {-i 20}"
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 [linsert $args 0 $self]"
    invoked from within
"::snit::RT.CallInstance ::dbgp::step::Snit_inst1 DoBreak break {-i 20}"
    ("eval" body line 1)
    invoked from within
"# Compiled -- no source code available
error "called a copy of a compiled script"", code = 998

 

 

Best regards,

Joy

 




Message: 3
Date: Tue, 21 Aug 2007 13:45:11 +0700
From: "Dmitriy Kovalev" <kds@xxxxxxxxx >
Subject: Re: [Dltk-dev] How to get the debugging thread?
To: "DLTK Developer Discussions" < dltk-dev@xxxxxxxxxxx>
Message-ID: <1ed85f0708202345tbbd20aap5b0f7e3b16325c30@xxxxxxxxxxxxxx >
Content-Type: text/plain; charset="utf-8"

Hello Joy,

It's strange that you can not use DebugEvent because it is thrown on every
breakpoint and when debug thread is created and terminated. But if you want
to get debugging thread not through DebugEvent pay attention to the class
ScriptEvaluationContextManager. This class allows to get IScriptStackFrame
by IWorkbenchPart. See the details of implementation for more information.

Thanks,
Dmitriy Kovalev

On 8/21/07, wang dada <runtoac@xxxxxxxxx> wrote:
>
> Hi,
> Could someone please tell me how to get the debugging thread of Tcl
> script?
> I know one of the methods is getting thread frome DebugEvent. But I can
> not catch DebugEvent when script stops at the first breakpoint, since my
> custom debug view is just loaded then. So I cannot initialize the debug
> view.
> Is there any other method to get the debugging thread?
>
>
> Best regards,
> Joy
>
>


Need a vacation? Get great deals to amazing places on Yahoo! Travel.

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






Back to the top