It's not a secret anymore!
The moose likes Beginning Java and the fly likes debug options while running from command line Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "debug options while running from command line" Watch "debug options while running from command line" New topic
Author

debug options while running from command line

bob szypula
Greenhorn

Joined: Feb 19, 2011
Posts: 5
..i am just beginning java and i am currently working from a text file and command line to compile and run.....
my question is whether there is a way using this method (as opposed to an IDE which i will do later) to show my
program variables in the command window while i am executing i guess in other words is there some sort of debug option or
is that strictly why there are IDES ???

thanks
Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 283

bob szypula wrote:..my question is whether there is a way using this method (as opposed to an IDE which i will do later) to show my
program variables in the command window while i am executing
thanks


i use System.out.println() to watch program variable if i am running from command line


-Chiru
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12953
    
    3

There is a tool included in the JDK called jdb. It's a debugger that works on the command line. It's much more primitive than debuggers that are built-in into IDEs, and I don't think many people are seriously using jdb to debug their code. It could be handy though, if you need to test something for example on a server where you have no graphical user environment.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35443
    
    9
For something more powerful than jdb, there's the very capable JSwat debugger.


Android appsImageJ pluginsJava web charts
bob szypula
Greenhorn

Joined: Feb 19, 2011
Posts: 5
thanks for those suggestions!!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: debug options while running from command line
 
Similar Threads
How can that possible compile???
Can We do a System.out.println() to a Console Window Inside Applet
Debugging java on unix
J2ee debug
Providing command line arguments to Java Program in Websphere