eclipse调试

Eniak 2010-01-29 02:45:26
在调试的时候,我怎么看一个变量的值呢?

class A {

public void bb(int aaa){
}
}
发现在查看 参数 aaa 的时候,有些问题,看不了,应该怎么使用Eclipse才能看呢?
...全文
263 23 打赏 收藏 转发到动态 举报
写回复
用AI写文章
23 条回复
切换为时间正序
请发表友善的回复…
发表回复
cloudzp 2010-02-02
  • 打赏
  • 举报
回复
一同学习
cloudzp 2010-02-02
  • 打赏
  • 举报
回复
kankan
Eniak 2010-01-31
  • 打赏
  • 举报
回复
调试的我是会,可是就是出不来变量的情况,

也是在调试的界面下了啊
zmzlfjmxj 2010-01-31
  • 打赏
  • 举报
回复
我也想知道这个问题的答案额
slide__292 2010-01-31
  • 打赏
  • 举报
回复
class A {

public void bb(int aaa){
system.out.println(aaa);
}
}
然后看看控制台,有没有出
JavaAlpha 2010-01-31
  • 打赏
  • 举报
回复
ECLIPSE的测试视图里就有。你点工具栏有个窗口--》点打开透视图,里面有个调试,就行了。
原来你是英文的,这样:
在工具栏里点window,点open Perspective ,点other,里面有个DEBUG,就会进入调试试图,之后就会在Variable显示你所要查看的变量
JavaAlpha 2010-01-31
  • 打赏
  • 举报
回复
直接在你想看地方前面加一个断点 跟一下看看

在debug模式下面的 变量 视图里面就可以看到的
wh_wtl 2010-01-31
  • 打赏
  • 举报
回复
好东西要顶的
不吃鱼的熊 2010-01-30
  • 打赏
  • 举报
回复
[Quote=引用楼主 eniak 的回复:]
在调试的时候,我怎么看一个变量的值呢?

class A {

  public void bb(int aaa){
  }
}
发现在查看 参数 aaa 的时候,有些问题,看不了,应该怎么使用Eclipse才能看呢?

[/Quote]
Debug AS -> Java Applicate 步进,选中变量,右键 Inspect 就可以看到了。
vivian1683 2010-01-30
  • 打赏
  • 举报
回复
号: 002607 Eclipse-JAVA-SH
Sr. Eclipse Tools developer

Responsibility
We are looking for senior talents who can design and develop eclipse plug-ins for driving the developer interaction with our Java infrastructure frameworks and integrate it with our development environment. The candidate needs to be a bright and self-motivated software engineer, with excellent computer science fundamentals, responsible for developing framework, tools and services using cutting-edge technologies that incorporate software engineering best practices to enhance our client software development and delivery capability.

Define, design and deliver an Eclipse based IDE with the appropriate set of plug-in distributions. Design a system that accommodates building for different environments and needs.

Requirement
- 5+ years Java development experience
- 2+ years experience in Eclipse plug-in related design, development and testing, including:
OSGi
PDE Build
Test automation
Class loaders
JDT
Eclipse
Workspace
Resources
Workbench
Builders and Natures

- Familar with XML
- Knowledge of either Maven or Ant
- Must be able to effectively collaborate in a fast paced environment with multiple teams in a large organization
- Good English in reading, writing, listening and speaking.
- Fast learner and team player
- Understanding of SOA is a plus, including WSDL and SOAP
- A good understanding of Design Patterns is a big plus
- Familiar with source code control tools such as ClearCase, SVN, SourceSafe, or CVS is a big plus.

有意者请发简历(注明应聘的职位号)到邮箱vivian1683@live.cn
联系QQ:635844351  MSN:vivian1683@live.cn
jcrsjcrs 2010-01-30
  • 打赏
  • 举报
回复
学习中
Eniak 2010-01-30
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 s222zj 的回复:]
你这个方法里肯定是代码的吧
比如下面两行...处
你在这里面打上断点
然后debug,当运行到该断点处,你直接把鼠标移到aaa上就应该可以看见值了
public void bb(int aaa){
.....
.....
  }

[/Quote]
这样的话,一个JAR包里面的东西是不是看不了了
mralcor 2010-01-30
  • 打赏
  • 举报
回复


MyEclipse6.5英文版的工具,看图片右上角的aaa值,当你调用方法时候,在方法里设置一个断点进行调试,就可以看到参数的当前值是多少。
JavaNormandy 2010-01-30
  • 打赏
  • 举报
回复
如果是web程序,首先保证,你是用debug模式启动的,如果是一般的类,启动用Debug as ->java applicaiton
查看变量值,有三种方法:
1,直接把鼠标放到你的变量上面可能看到 ;
2,在variable对话框里面可以看到变量的值;
3,选中你的变量,点击Inspect(或者直接快捷健shilf + ctrl + i)
重返春季 2010-01-30
  • 打赏
  • 举报
回复
有一个变量视图的,可以看到每一个变量。视图为:Variables窗口。
Eniak 2010-01-29
  • 打赏
  • 举报
回复
这个真没有
s222zj 2010-01-29
  • 打赏
  • 举报
回复
你这个方法里肯定是代码的吧
比如下面两行...处
你在这里面打上断点
然后debug,当运行到该断点处,你直接把鼠标移到aaa上就应该可以看见值了
public void bb(int aaa){
.....
.....
}
Eniak 2010-01-29
  • 打赏
  • 举报
回复
都过了断点那行了,还是没有的
  • 打赏
  • 举报
回复
接着往下走
Eniak 2010-01-29
  • 打赏
  • 举报
回复
不行啊,参数就看不了,用的是英文版

单击右键-》watch应该是你说的吧,有个变量加进去了,但是在 变量(variables)下没有出现,但是在表达式(Expersion)下有变量名,红颜色的

加载更多回复(2)

58,441

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧