Redian新闻
>
JCreator如何调试程序?
avatar
JCreator如何调试程序?# Java - 爪哇娇娃
f*2
1
为什么我的JCreator里边有关调试的选项
start debugger, step什么的都是黑的?
avatar
c*t
2
A java developer should not need to use a debugger at all.
Stack trace and println are 100x more effective in debugging
and discovering bugs.
As for your question, usually each java class can have a main
function, so it is necessary to define which class you are trying
to run.

【在 f******2 的大作中提到】
: 为什么我的JCreator里边有关调试的选项
: start debugger, step什么的都是黑的?

avatar
g*g
3
I think a debugger is essential for non-trivial program,
debugger certainly help improve productivity.

【在 c*****t 的大作中提到】
: A java developer should not need to use a debugger at all.
: Stack trace and println are 100x more effective in debugging
: and discovering bugs.
: As for your question, usually each java class can have a main
: function, so it is necessary to define which class you are trying
: to run.

avatar
t*g
4
true

【在 g*****g 的大作中提到】
: I think a debugger is essential for non-trivial program,
: debugger certainly help improve productivity.

avatar
s*g
5
新建的时候要建成project就可以用了
avatar
g*u
6
这个也太抬举println和stack trace了。

【在 c*****t 的大作中提到】
: A java developer should not need to use a debugger at all.
: Stack trace and println are 100x more effective in debugging
: and discovering bugs.
: As for your question, usually each java class can have a main
: function, so it is necessary to define which class you are trying
: to run.

avatar
c*t
7
A java developer should not need to use a debugger at all.
Stack trace and println are 100x more effective in debugging
and discovering bugs.
As for your question, usually each java class can have a main
function, so it is necessary to define which class you are trying
to run.

【在 f******2 的大作中提到】
: 为什么我的JCreator里边有关调试的选项
: start debugger, step什么的都是黑的?

avatar
g*g
8
I think a debugger is essential for non-trivial program,
debugger certainly help improve productivity.

【在 c*****t 的大作中提到】
: A java developer should not need to use a debugger at all.
: Stack trace and println are 100x more effective in debugging
: and discovering bugs.
: As for your question, usually each java class can have a main
: function, so it is necessary to define which class you are trying
: to run.

avatar
B*N
9
i doubt your productivity, though you are NIU.

【在 c*****t 的大作中提到】
: A java developer should not need to use a debugger at all.
: Stack trace and println are 100x more effective in debugging
: and discovering bugs.
: As for your question, usually each java class can have a main
: function, so it is necessary to define which class you are trying
: to run.

avatar
c*t
10
Hmm, I wrote and managed an 100k+ lines of Java GUI application without
using debugger at all. And I am recognized by my supervisor as a fast
coder ^_^
I have no idea why you have to depend on the debugger. Exception stack
trace tells you the exactly the line of the problem.

【在 B******N 的大作中提到】
: i doubt your productivity, though you are NIU.
avatar
t*g
11
100K+ line Java GUI application is not a big deal.
debugger is much more helpful on the server side application.

【在 c*****t 的大作中提到】
: Hmm, I wrote and managed an 100k+ lines of Java GUI application without
: using debugger at all. And I am recognized by my supervisor as a fast
: coder ^_^
: I have no idea why you have to depend on the debugger. Exception stack
: trace tells you the exactly the line of the problem.

avatar
g*g
12
As I said many times, it's not that you cannot do it, but
that you are not doing it as quickly as you can with an IDE.
Eclipse is gonna beat any editor without a debugger for any non-trivial
application, that's the bloody truth.
In many cases, you don't have an Exception stack, you code logic simply goes
wrong somewhere. How do you debug it without a debugger? A reasonable
guess would be writing some System.out or logger.debug stuff, if you are
using a collection, especially multi-level collecti

【在 c*****t 的大作中提到】
: Hmm, I wrote and managed an 100k+ lines of Java GUI application without
: using debugger at all. And I am recognized by my supervisor as a fast
: coder ^_^
: I have no idea why you have to depend on the debugger. Exception stack
: trace tells you the exactly the line of the problem.

avatar
c*t
13
On the contrary, running from debugger is bad because
1. slow. Application launched by JVM in general runs significantly slower,
even if you do not consider the debugging.
2. break point. The hard part of debugging is actually figuring out what's
wrong. How could you break point everything? You are just wasting
your time doing stepping for a non-trivial application. That's why
exception stack and exception cascade and logging are critical in
reporting bugs, otherwise you coul

【在 g*****g 的大作中提到】
: As I said many times, it's not that you cannot do it, but
: that you are not doing it as quickly as you can with an IDE.
: Eclipse is gonna beat any editor without a debugger for any non-trivial
: application, that's the bloody truth.
: In many cases, you don't have an Exception stack, you code logic simply goes
: wrong somewhere. How do you debug it without a debugger? A reasonable
: guess would be writing some System.out or logger.debug stuff, if you are
: using a collection, especially multi-level collecti

avatar
g*g
14

What do you mean slower? Don't you have to have a JVM to run a java app
anyway?
It does slow down a bit in debugging mode, but for most applications, it's
not something detectable.
s
Isn't that the same problem for you to figure out where to put the debugging
code? I only step through code that are suspicous, without writing any code,
which is for sure faster. And does using a debugger have anything to do
with stacks/loggings..? I still have the exception stack and log4j, only I
am
one click aw

【在 c*****t 的大作中提到】
: On the contrary, running from debugger is bad because
: 1. slow. Application launched by JVM in general runs significantly slower,
: even if you do not consider the debugging.
: 2. break point. The hard part of debugging is actually figuring out what's
: wrong. How could you break point everything? You are just wasting
: your time doing stepping for a non-trivial application. That's why
: exception stack and exception cascade and logging are critical in
: reporting bugs, otherwise you coul

avatar
c*t
15
Well, go test a piece code (any language, including Java) that normally
finishes within 1 sec from command line. Now execute it from a JVM, it
can take up to 10 sec to finish, particularly if it contains floating
point calculations.
The fundamental problem with using debugger is
1. One has to know where the problem occurs. Otherwise, you are wasting
time stepping. A lot of time, a bug occurs in a function not really
because the function is bugged, but the problem has occurred else
wh

【在 g*****g 的大作中提到】
:
: What do you mean slower? Don't you have to have a JVM to run a java app
: anyway?
: It does slow down a bit in debugging mode, but for most applications, it's
: not something detectable.
: s
: Isn't that the same problem for you to figure out where to put the debugging
: code? I only step through code that are suspicous, without writing any code,
: which is for sure faster. And does using a debugger have anything to do
: with stacks/loggings..? I still have the exception stack and log4j, only I

avatar
B*N
16
yeah,, this is what i want to say. GUI doesn't have a lot of business logic
inside, so not a lot of debugging needed.
Java Swing does have a big learning curve, but once you master it you really
master it. Not a lot of debugging needed.

【在 t*********g 的大作中提到】
: 100K+ line Java GUI application is not a big deal.
: debugger is much more helpful on the server side application.

avatar
c*t
17
lol... What kind of GUI application did you develop? If you are just
laying things out, that's the trivial part. I can write a fairly
complicated layout for Swing in minutes using XML. I won't be bragging
on that ^_^
God's work is in the details. Writing an interactive application that
consider a wide range of things users could do and would do and provide
the best experience is not so trivial. And we haven't touched the
feature part.

logic
really

【在 B******N 的大作中提到】
: yeah,, this is what i want to say. GUI doesn't have a lot of business logic
: inside, so not a lot of debugging needed.
: Java Swing does have a big learning curve, but once you master it you really
: master it. Not a lot of debugging needed.

avatar
B*N
18
frankly speaking, the swing code i wrote probably is not less than yours.
the interactivity thing you mentioned is usability issue, there are
professionals to take care. I work with serveral of them, i have pretty good
sense for that part.
I don't feel Swing is fun anymore, since i almost know everything, from
developing a chart library to IDE level UI developement, also customized
look and feel. I have read almost all swing source code. no magic any more.

【在 c*****t 的大作中提到】
: lol... What kind of GUI application did you develop? If you are just
: laying things out, that's the trivial part. I can write a fairly
: complicated layout for Swing in minutes using XML. I won't be bragging
: on that ^_^
: God's work is in the details. Writing an interactive application that
: consider a wide range of things users could do and would do and provide
: the best experience is not so trivial. And we haven't touched the
: feature part.
:
: logic

avatar
c*t
19
We are off topic, but I am in the mood of chatting ^_^
A GUI application is not just Swing. As I said, Swing itself is
the trivial part. GUI has 3 components: framework, individual modules
(plugins), interaction among modules. Frame work is important because
different modules can run in the same JVM, but that would not automatically
means an application. It provides configuration, module loading, document
manager, GUI services such as menu, toolbar, docking, look&feel and
message logging, et

【在 B******N 的大作中提到】
: frankly speaking, the swing code i wrote probably is not less than yours.
: the interactivity thing you mentioned is usability issue, there are
: professionals to take care. I work with serveral of them, i have pretty good
: sense for that part.
: I don't feel Swing is fun anymore, since i almost know everything, from
: developing a chart library to IDE level UI developement, also customized
: look and feel. I have read almost all swing source code. no magic any more.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。