🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.debugger
Article #345

Re: jbuilder debugger Expression Insight and tool tips don't work

#345
From: Hin Boen
Date: Fri, 13 Feb 2004 19:16
589 lines
12090 bytes
Hi Yu,

> I tried to put
> "Breakpoint" into several classes of my project but they were turned out to
> be invalid "Breakpoint"

This can happen if the class file is not compiled with debug information or the source file and the actual class file are not in sync.

> "Hit breakpoint in class
> java.awt.EventDispatchThread
> why it's stopped at the EventDispatchThread?

You must have added a breakpoint in this class. I suspect you may have added either line breakpoint or class breakpoint.  Launch JBuilder, Run | View Breakpoints... to see all breakpoints that are defined in your project.

-Hin




Do you have a class file


yu wrote:

>Hi Hin,
>
>
>
>  I can use the debugger now but I'm still confused.  I tried to put
>"Breakpoint" into several classes of my project but they were turned out to
>be invalid "Breakpoint".  Therefore, instead of stopping at these break
>points, it displayed an error message like "Hit breakpoint in class
>java.awt.EventDispatchThread.  Tracing is disabled for this class".
>
>
>
>Could you tell me why some of the break points are invalid and why it's
>stopped at the EventDispatchThread?
>
>
>
>It seems that the "Pause" button does not work in my project, every time I
>hit it, it will stop at some JDK files such as WToolkit.java.  Why is that?
>
>
>
>How can I keep a better track of the debugging process using break points in
>my project involving hundred of files?
>
>
>
>Thanks for your time, I really appreciate it.
>
>
>
>Yu
>
>"Hin Boen" <hboen@borland.com> wrote in message
>news:402c31d1$1@newsgroups.borland.com...
>  
>
>>Hi Yu,
>>
>>    
>>
>>>Do I have to use "Add Break point" and follow up with "Step Into" or
>>>"Step Over" to debug the project?
>>>      
>>>
>>It depends on what problem you are trying to debug. The basic idea is you
>>    
>>
>need to suspend the VM before you can "debug" your code. Most of the
>debugger operations are disabled until the VM is suspended. To suspend the
>VM you can use breakpoints, or pause command.
>  
>
>>-Hin
>>
>>
>>
>>yu wrote:
>>
>>    
>>
>>>Hi Hin,
>>>
>>>
>>>
>>> Thanks for your quick response. It worked when I used the "Add
>>>      
>>>
>Breakpoint"
>  
>
>>>trick.  Do I have to use "Add Break point" and follow up with "Step Into"
>>>      
>>>
>or
>  
>
>>>"Step Over" to debug the project?  I am working on a complicated java
>>>project including hundreds of source files connected to a similar package
>>>serving as a library for this project.  I just switched to use JBuilder
>>>      
>>>
>to
>  
>
>>>work on this project.  Since I'm a new user for JBuilder, could you tell
>>>      
>>>
>me
>  
>
>>>a good strategy to debug such kind of project using Jbuilder.  Do I have
>>>      
>>>
>to
>  
>
>>>use different "Break points" for different source files in order to find
>>>bugs in these classes?  Many thanks,
>>>
>>>
>>>
>>>Yu
>>>
>>>
>>>
>>>"Hin Boen" <hboen@borland.com> wrote in message
>>>news:402bc4f7$1@newsgroups.borland.com...
>>>
>>>
>>>      
>>>
>>>>Hi Yu,
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>suspended the project for debugging
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>I assume you press "pause" button to suspend the VM.  And the VM happens
>>>>to stop at WToolkit.java.  Since this java file is part of the JDK, and
>>>>is not compiled with debug information, JBuilder will not be able to
>>>>show you any data.
>>>>
>>>>If you want the VM to stop at your java code, you need to add a line
>>>>breakpoint in that java code. When VM executes that java code, it will
>>>>hit the line breakpoint and suspend the VM.
>>>>
>>>>-Hin
>>>>
>>>>
>>>>yu wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>Thanks Hin.  After I compiled the codes with debug option (or -g using
>>>>>javac), suspended the project for debugging, pressed the "Show Current
>>>>>Frame" button, I didn't see the local variables in the current frame.
>>>>>          
>>>>>
>It
>  
>
>>>>>only displayed "No debug information" in the current frame.  In the
>>>>>"Threads, call stacks and data" frame, it showed the current stepping
>>>>>
>>>>>
>>>>>          
>>>>>
>>>thread
>>>
>>>
>>>      
>>>
>>>>>is at "AWT-Windows" and the selected stack frame is "eventLoop() -1,
>>>>>sun.awt.windows.WToolkit, WToolkit.java".   What went wrong?  Do I miss
>>>>>
>>>>>
>>>>>          
>>>>>
>>>any
>>>
>>>
>>>      
>>>
>>>>>critical components in my system.  I did try to reinstall JBuilder on
>>>>>          
>>>>>
>my
>  
>
>>>>>computer but that didn't help.  Any more suggestions?  Thanks,
>>>>>
>>>>>
>>>>>"Hin Boen" <hboen@borland.com> wrote in message
>>>>>news:402ab5b7@newsgroups.borland.com...
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>Hi Yu,
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>after I suspended the project for debugging
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>When the VM in the suspended mode, press "Show Current Frame" button,
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>see
>>>
>>>
>>>      
>>>
>>>>>>            
>>>>>>
>>>>>if the local variable is also shown in the current frame. "Show Current
>>>>>Frame" button is the rightmost button located on the button of JBuilder
>>>>>screen. If you do see the local variables, could you move the mouse
>>>>>          
>>>>>
>over
>  
>
>>>>>          
>>>>>
>>>any
>>>
>>>
>>>      
>>>
>>>>>of those local variables in the editor, and see if the tool tips value
>>>>>          
>>>>>
>is
>  
>
>>>>>displayed?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>            
>>>>>>
>>>>>>>I can't make the Expression Insight and tool tips features
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>To display the Expression Insight window, you need to hold down the
>>>>>>            
>>>>>>
>ctrl
>  
>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>key, and move the mouse to the expression that you want to evaluate.
>>>>>          
>>>>>
>To
>  
>
>>>>>          
>>>>>
>>>see
>>>
>>>
>>>      
>>>
>>>>>the tool tips value, just move the mouse to the expression that you
>>>>>          
>>>>>
>want
>  
>
>>>>>          
>>>>>
>>>to
>>>
>>>
>>>      
>>>
>>>>>evaluate.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>Thanks
>>>>>>Hin
>>>>>>
>>>>>>yu wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>Thanks for your response, Hin.  I did use -g option when compiling
>>>>>>>              
>>>>>>>
>the
>  
>
>>>>>>>codes.  I also used the Project Properties with the "Source, line and
>>>>>>>variable information" for Debug options.  It didn't work either.
>>>>>>>              
>>>>>>>
>Even
>  
>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>when
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>>I tried the "Welcome.jpx" and other examples provided by "JBuilder",
>>>>>>>              
>>>>>>>
>I
>  
>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>can't
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>>make the Expression Insight and tool tips features work after I
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>suspended
>>>
>>>
>>>      
>>>
>>>>>>>the project for debugging.  This is so frustrating.  Please let me
>>>>>>>              
>>>>>>>
>know
>  
>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>if
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>>you or anybody in the newsgroup would have more suggestions.  Thanks.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Bruce
>>>>>>>
>>>>>>>"Hin Boen" <hboen@borland.com> wrote in message
>>>>>>>news:4027eb90$1@newsgroups.borland.com...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>It seems to me that your class files do not have any debug
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>information.
>>>
>>>
>>>      
>>>
>>>>>>>>Please make sure your application is compiled with debug information
>>>>>>>>option.  If you compile your application with javac, you need to
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>use -g
>>>
>>>
>>>      
>>>
>>>>>>>>option.  If you compile your application within JBuilder, see
>>>>>>>>                
>>>>>>>>
>Project
>  
>
>>>>>>>>                
>>>>>>>>
>>>|
>>>
>>>
>>>      
>>>
>>>>>>>>Project Properties..., select Build tab, select Java tab
>>>>>>>>
>>>>>>>>Thanks
>>>>>>>>Hin
>>>>>>>>
>>>>>>>>yu wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>>>Hi,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>I tried to use the JBuilder 8 SE version to debug my projects.
>>>>>>>>>                  
>>>>>>>>>
>Every
>  
>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>time
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>>I used the debugger to see variable values with the Expression
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>Insight
>>>
>>>
>>>      
>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>and
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>>tool tips features, it doesn't show those variable values.  If I
>>>>>>>>>                  
>>>>>>>>>
>use
>  
>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>control
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>>key and the right mouse click, it always shows the variable <not in
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>scope>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>>message.  What am I doing wrong or this feature is not available in
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>the
>>>
>>>
>>>      
>>>
>>>>>>>>>JBuilder 8 SE version?  Many thanks,  Bruce
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>
>>>
>>>      
>>>
>
>
>  
>
Technical Details
Message-ID: <402d21a3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4025814c$1@newsgroups.borland.com> <4027eb90$1@newsgroups.borland.com> <402a6c21@newsgroups.borland.com> <402ab5b7@newsgroups.borland.com> <402bc220$2@newsgroups.borland.com> <402bc4f7$1@newsgroups.borland.com> <402bfe18$1@newsgroups.borland.com> <402c31d1$1@newsgroups.borland.com> <402c7571$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5c5,4194eead2bfcdcfa
X-Google-Attributes: gidff5c5,public
X-Google-ArrivalTime: 2004-02-13 11:26:52 PST
Date: Fri, 13 Feb 2004 11:16:49 -0800
From: Hin Boen <hboen@borland.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.debugger
Subject: Re: jbuilder debugger Expression Insight and tool tips don't work
References: <4025814c$1@newsgroups.borland.com> <4027eb90$1@newsgroups.borland.com> <402a6c21@newsgroups.borland.com> <402ab5b7@newsgroups.borland.com> <402bc220$2@newsgroups.borland.com> <402bc4f7$1@newsgroups.borland.com> <402bfe18$1@newsgroups.borland.com> <402c31d1$1@newsgroups.borland.com> <402c7571$1@newsgroups.borland.com>
In-Reply-To: <402c7571$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.143.11.228
Message-ID: <402d21a3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1076699555 10.143.11.228 (13 Feb 2004 11:12:35 -0800)
Lines: 590
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail