You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Abhik Lahiri <ab...@gmail.com> on 2010/09/19 22:34:28 UTC

debugging in the uima framework

Hi all,
I am a newbie at the UIMA framework and I am writing code in eclipse using
the uima-plugins for eclipse. I wanted to know whether there is any way in
which one can debug code written in the uima framework, set breakpoints etc?
because in eclipse, I am unable to set breakpoints in the .java class files
that were generated by my .xml descriptor files!

Thanks a lot for all your help!

Regards,
Abhik

Re: debugging in the uima framework

Posted by Marshall Schor <ms...@schor.com>.
 I tried setting a breakpoint and it worked for me.

Here's what I did:

In the uimaj-examples project, I set a breakpoint in the
org.apache.uima.tutorial.RoomNumber.java file, on line 71, where it constructs a
new instance.

Then, I ran the document analyzer in debug mode (launching from eclipse), and
specified the tutorial example 1 room number annotator as the one to run.

It stopped on the breakpoint.

So, my guess is that the behavior that you are seeing is probably not caused by
the break point "not working", but rather by something else, such as the code
isn't running through the path where you set the breakpoint.

But perhaps I have misunderstood what you were saying.  Did you mean that the
process in Eclipse, where you open a source file, (say, the
org.apache.uima.tutorial.RoomNumber.java file in the uimaj-examples project),
and then do the Eclipse action to set the breakpoint (double-left-clicking the
mouse on the little grey bar on the left side of the Editor window, on the line
where you want the breakpoint), doesn't toggle the breakpoint on that line?

-Marshall

On 9/20/2010 11:12 PM, Abhik Lahiri wrote:
> Hi everyone,
> I am still looking for answer to my question on how to debug java code
> written in uima framework in eclipse? I mean I cant set breakpoints on the
> .java files that are generated using the JCasGen tool.
>
> Can anyone please help??
>
> Thanks a lot!
>
> Regards,
> Abhik
>
> On Sun, Sep 19, 2010 at 9:58 PM, Abhik Lahiri <ab...@gmail.com> wrote:
>
>> Hi Marshall,
>> Below are the answers to your 2 questions:
>>
>> 1) I am writing annotator code.
>> 2) I can't set breakpoints in any of the .java files that are generated by
>> JCasGen from the .xml analysis engine descriptor files (usually in the /desc
>> folder in your project workspace)
>>
>> Thanks a lot,
>> Abhik
>>
>>
>> On Sun, Sep 19, 2010 at 8:47 PM, Marshall Schor <ms...@schor.com> wrote:
>>
>>>
>>> On 9/19/2010 4:34 PM, Abhik Lahiri wrote:
>>>> Hi all,
>>>> I am a newbie at the UIMA framework and I am writing code in eclipse
>>> using
>>>> the uima-plugins for eclipse.
>>> Which "uima-plugins for eclipse" are you referring to?  Are you writing
>>> annotators, or are you writing Eclipse Plugins or something else?
>>>
>>>> I wanted to know whether there is any way in
>>>> which one can debug code written in the uima framework, set breakpoints
>>> etc?
>>>> because in eclipse, I am unable to set breakpoints in the .java class
>>> files
>>>> that were generated by my .xml descriptor files!
>>> Can you be more specific - what particular files that "were generated by"
>>> your
>>> .xml descriptor files, could you not set breakpoints in?
>>>
>>> -Marshall
>>>
>>>

Re: debugging in the uima framework

Posted by Abhik Lahiri <ab...@gmail.com>.
Hi everyone,
I am still looking for answer to my question on how to debug java code
written in uima framework in eclipse? I mean I cant set breakpoints on the
.java files that are generated using the JCasGen tool.

Can anyone please help??

Thanks a lot!

Regards,
Abhik

On Sun, Sep 19, 2010 at 9:58 PM, Abhik Lahiri <ab...@gmail.com> wrote:

> Hi Marshall,
> Below are the answers to your 2 questions:
>
> 1) I am writing annotator code.
> 2) I can't set breakpoints in any of the .java files that are generated by
> JCasGen from the .xml analysis engine descriptor files (usually in the /desc
> folder in your project workspace)
>
> Thanks a lot,
> Abhik
>
>
> On Sun, Sep 19, 2010 at 8:47 PM, Marshall Schor <ms...@schor.com> wrote:
>
>>
>>
>> On 9/19/2010 4:34 PM, Abhik Lahiri wrote:
>> > Hi all,
>> > I am a newbie at the UIMA framework and I am writing code in eclipse
>> using
>> > the uima-plugins for eclipse.
>>
>> Which "uima-plugins for eclipse" are you referring to?  Are you writing
>> annotators, or are you writing Eclipse Plugins or something else?
>>
>> > I wanted to know whether there is any way in
>> > which one can debug code written in the uima framework, set breakpoints
>> etc?
>> > because in eclipse, I am unable to set breakpoints in the .java class
>> files
>> > that were generated by my .xml descriptor files!
>>
>> Can you be more specific - what particular files that "were generated by"
>> your
>> .xml descriptor files, could you not set breakpoints in?
>>
>> -Marshall
>>
>>
>

Re: debugging in the uima framework

Posted by Abhik Lahiri <ab...@gmail.com>.
Hi Marshall,
Below are the answers to your 2 questions:

1) I am writing annotator code.
2) I can't set breakpoints in any of the .java files that are generated by
JCasGen from the .xml analysis engine descriptor files (usually in the /desc
folder in your project workspace)

Thanks a lot,
Abhik

On Sun, Sep 19, 2010 at 8:47 PM, Marshall Schor <ms...@schor.com> wrote:

>
>
> On 9/19/2010 4:34 PM, Abhik Lahiri wrote:
> > Hi all,
> > I am a newbie at the UIMA framework and I am writing code in eclipse
> using
> > the uima-plugins for eclipse.
>
> Which "uima-plugins for eclipse" are you referring to?  Are you writing
> annotators, or are you writing Eclipse Plugins or something else?
>
> > I wanted to know whether there is any way in
> > which one can debug code written in the uima framework, set breakpoints
> etc?
> > because in eclipse, I am unable to set breakpoints in the .java class
> files
> > that were generated by my .xml descriptor files!
>
> Can you be more specific - what particular files that "were generated by"
> your
> .xml descriptor files, could you not set breakpoints in?
>
> -Marshall
>
>

Re: debugging in the uima framework

Posted by Marshall Schor <ms...@schor.com>.

On 9/19/2010 4:34 PM, Abhik Lahiri wrote:
> Hi all,
> I am a newbie at the UIMA framework and I am writing code in eclipse using
> the uima-plugins for eclipse. 

Which "uima-plugins for eclipse" are you referring to?  Are you writing
annotators, or are you writing Eclipse Plugins or something else?

> I wanted to know whether there is any way in
> which one can debug code written in the uima framework, set breakpoints etc?
> because in eclipse, I am unable to set breakpoints in the .java class files
> that were generated by my .xml descriptor files!

Can you be more specific - what particular files that "were generated by" your
.xml descriptor files, could you not set breakpoints in?

-Marshall