怎样在myEclipse中使用debug调试程序?
怎样在myEclipse中使用debug调试程序?
最基本的操作是:
1.首先在一个java文件中设断点,然后debug as-->open debug Dialog,然后在对话框中选类后--> Run
当程序走到断点处就会转到debug视图下。
2.F5键与F6键均为单步调试,F5是step into,也就是进入本行代码中执行,F6是step over,
也就是执行本行代码,跳到下一行,
3.F7是跳出函数
4.F8是执行到最后。
1.Step Into (also F5) 跳入
2.Step Over (also F6) 跳过
3.Step Return (also F7) 执行完当前method,然后return跳出此method
4.step Filter 逐步过滤 一直执行直到遇到未经过滤的位置或断点(设置Filter:window-preferences-java-Debug-step Filtering)
5.resume 重新开始执行debug,一直运行直到遇到breakpoint
6.hit count 设置执行次数 适合程序中的for循环(设置 breakpoint view-右键hit count)
7.inspect 检查 运算。执行一个表达式显示执行值
8.watch 实时地监视变量的变化
9.我们常说的断点(breakpoints)是指line breakpoints,除了line breakpoints,还有其他的断点类型:field(watchpoint)breakpoint,method breakpoint,exception breakpoint.
10.field breakpoint 也叫watchpoint(监视点) 当成员变量被读取或修改时暂挂
11.添加method breakpoint 进入/离开此方法时暂挂(Run-method breakpoint)
12.添加Exception breakpoint 捕抓到Execption时暂挂(待续...)
断点属性:
1.hit count 执行多少次数后暂挂 用于循环
2.enable condition 遇到符合你输入条件(为ture\改变时)就暂挂
3.suspend thread 多线程时暂挂此线程
4.suspend VM 暂挂虚拟机
13.variables 视图里的变量可以改变变量值,在variables 视图选择变量点击右键--change value.一次来进行快速调试。
14.debug 过程中修改了某些code后--〉save&build-->resume-->重新暂挂于断点
怎样在myEclipse中使用debug调试程序?的更多相关文章
- MyEclipse中使用debug调试程序
最基本的操作是: 1.首先在一个java文件中设断点,然后debug as-->open debug Dialog,然后在对话框中选类后--> Run 当程序走到断 ...
- 在MyEclipse中使用debug模式
转:http://blog.csdn.net/competerh_programing/article/details/6773371 1, 首先在一个java文件中设断点,然后运行,当程序走到断点 ...
- Myeclipse中如何修改Tomcat的端口号
一,使用 Myeclipse 中自带的 tomcat 右键 configure 弹出窗口 在 port Number 中修改 端口号即可: 二,配置的 tomcat 如果用上述的方法,只能打开这样的窗 ...
- 在Visual Studio中使用Debug Visualizers在C++中实现对原始类的自定义调试信息显示
在Visual Studio中使用Debug Visualizers在C++中实现对原始类的自定义调试信息显示 当我们在VS的C++中使用vector.list.map等这些STL容器,在开启调试的时 ...
- 在tomcat中添加虚拟主机,myeclipse中整合jdk和tomcat
* 虚拟主机技术 ---- 在tomcat中配置 <Host> 元素 1.下载搭建tomcat中网站 --- baidu 2.在c盘 新建虚拟主机目录 baidu , 在虚拟主机目录中 ...
- VS中的Debug 和 Release 编译方式的本质区别
VS中的Debug 和 Release 编译方式的本质区别 Debug 通常称为调试版本,它包含调试信息,并且不作任何优化,便于程序员调试程序.Release 称为发布版本,它往往是进行了各种优化,使 ...
- Myeclipse中Tomcat的两种部署方式
一.在Myeclipse软件中部署 1. 在Myeclipse中,创建好工程后,在Myeclipse菜单栏中选择 Windows -> Preferences -> Myeclipse - ...
- 转: Android 软件开发之如何使用Eclipse Debug调试程序详解(七)
转自: http://www.uml.org.cn/mobiledev/201110092.asp Android 软件开发之如何使用Eclipse Debug调试程序详解(七) 发布于2011- ...
- 如何在Eclipse或者Myeclipse中使用tomcat(配置tomcat,发布web项目)?(图文详解)(很实用)
前期博客 Eclipse里的Java EE视图在哪里?MyEclipse里的Java EE视图在哪里?MyEclipse里的MyEclipse Java Enterprise视图在哪里?(图文详解) ...
随机推荐
- 初识Python类
吐槽:学习面向对象就像你追一个女神一样,刚刚有点感觉了,过几天又陷入绝望的感觉,很蛋疼. 类的语法 class Person(object): print("learning class&q ...
- php构造函数连接数据库
index.php require_once("mysql.config.php"); require_once("mysql.class.php"); ech ...
- yourphp读取分类名称{$Categorys[$r[catid]]['catname']}
页面代码: product_list.html 提供分类的id,找出分类的名称 {$Categorys[$r[catid]]['catname']}
- Nginx 支持 WAF 防护功能实战
WAF(Web Application Firewall),中文名称叫做“Web应用防火墙 WAF的定义是这样的:Web应用防火墙是通过执行一系列针对HTTP/HTTPS的安全策略来专门为Web应用提 ...
- queryString(正则表达式版本)
获取所有query string function queryStringAll(s) { var reg = /(?:^|&)([^&]+)=([^&]+)(?=&| ...
- verilog阻塞与非阻塞的初步理解(三)
下面这段源码是因为习惯不好,出现不正确波形的例子. module pwm_division(reset,clkin,clkout); input reset,clkin; output clkout; ...
- css3实现渐变的iPhone滑动解锁效果
先贴代码 <!DOCTYPE html> <html> <head> <style> p{ width:50%; margin:0 auto; line ...
- fedora14 安装中文输入法
We trust you have received the usual lecture (n. 演讲 讲课 讲座; 教训 训斥 告诫) from the local SystemAdministra ...
- firefox如何卸载插件plugins和临时文件夹
下载原版的 英文版的 firefox 会看到 openH264 video codec Plugin和microsoft DRM (digit rightcopy manager 数字版权管理)等等插 ...
- flask 知识点总结
============================request对象的常用属性============================具体使用方法如下:request.headers, requ ...