🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18393

undebuggable code

#18393
From: John Collins
Date: Thu, 25 Jun 1998 00:00
23 lines
1485 bytes
It seems if you write an anonymous inner class, that is derrived from one
that implements Runnable, when you spin up a Tread with it, you can't trip
the breakpoints in it you have set.

Now, that seems almost reasonable given the fact that the debugger is only
uh human, but I have heard/read no caveats warning against _not_ writing
such code.

If you name the anonymous classes and make them "conventional" then the
breakpoints work fine.  I have spent a few evening sessions unrolling such
code recently.  Kind of sucks.  Hopefully people will be avoiding this in
the future.  Is there a FAQ yet on things to do or not do in Java to help
you debug your code?

Seems like Java is _potentially_ far more debuggable than C++, in fact it
probably is no matter what you do.  But there are a few gotchas that C++
experience will not help you with.  Just good guesswork and experience.  Be
nice to have that stuff in a FAQ.

--
John Collins   mailto:jcollins@access.digex.net
http://www.access.digex.net/~jcollins
Technical Details
Message-ID: <6msi3a$lpr16@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,18a503a47b7cea9b,start
X-Google-Attributes: gidf74b3,public
From: "John Collins" <jcollins@access.digex.net>
Subject: undebuggable code
Date: 1998/06/25
Message-ID: <6msi3a$lpr16@forums.borland.com>
X-Deja-AN: 365860697
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language