Results 1 to 4 of 4
Thread: [SOLVED] [newbie] any DEBUG?
- 05-13-2009, 06:45 PM #1
[SOLVED] [newbie] any DEBUG?
If I remember well :), in C# it was possible to have portions of code that were used only during debugging such as:
Is anything similar possible with Java 1.6? I would be able to switch off/on debug code when deploying the LIVE version to production, without having to comment out a lot of code.Java Code:IF #DEBUG assert Expression1 : Expression2; ENDIF #DEBUG
Environment notes
Eclipse 3.4.2
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
Windows box (Windows Server 2008 64 bit)...regrettably :)
- 05-13-2009, 08:37 PM #2
To debug or not to debug....
Please take a look at the following link:
Debug challenge: how do you debug a Java program?
It has plenty of examples of different types of ways to debug, including the one you want to use.
Luck,
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 05-13-2009, 09:16 PM #3
I figured out that using the "good old" println is pretty much of a popular debugger :)
- 05-14-2009, 04:08 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If I remember correctly, I think we discuss about the use of status variable to handle debug, just checking the condition true-false.
Similar Threads
-
Debug challenge: how do you debug a Java program?
By CJSLMAN in forum New To JavaReplies: 60Last Post: 07-04-2009, 10:28 AM -
Cannot debug on Eclipse.. and other IDE
By pexlee in forum EclipseReplies: 0Last Post: 09-26-2008, 05:07 PM -
Cannot debug in NetBeans as well as other IDE
By pexlee in forum NetBeansReplies: 0Last Post: 09-26-2008, 04:45 PM -
SciTE-debug 0.9.1
By Java Tip in forum Java SoftwareReplies: 0Last Post: 04-10-2008, 04:14 PM -
how to debug the servlet
By tommy in forum Java ServletReplies: 1Last Post: 08-06-2007, 08:53 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks