Configuring the launch of the remote virtual machine to debug
Options need to be added to the standard launch of a virtual machine (VM) to enable the debugging architecture, allowing us to attach (hook in) and collect data.
|
-Xdebug |
Enables remote debugging. |
|
-Xnoagent |
On a Sun VM, disables the proprietary debugging interface thus letting JPDA work correctly.在Sun VM上,禁用专有调试接口,从而允许JPDA正确工作。 |
|
-Djava.compiler=NONE |
Disables Just-In-Time (JIT) compilation.. 我们一般debug程序的时候,只是关注其中的一部分代码,而且大部分情况下是设置断点,然后单步执行,而JIT的编译单位是class,只要我们执行了class里面的代码,JIT就会对整个class进行编译,而我们实际执行的代码一般都是其中的一部分代码,所以从整个时间效率上来看,采用JIT反而更费时间。也就是说在JVM远程调试这个事情上,禁用JIT(只使用转译器,解释一行执行一条)更合理,所以通过-Djava.compiler=NONE来禁止JIT。 |
|
-Xrunjdwp: transport=dt_socket, server=y, address=5000, suspend=y |
Loads JDWP (Java Debug Wire Protocol), the reference implementation of JPDA. Sub-options further specify the option. |
|
transport=dt_socket |
Sets the transport type for the connection with the debugging application; in this example, we will connect via a socket. |
|
server=y |
Tells the VM whether it must be receptive to an attaching debugging application. |
|
address=5000 |
The port address for our connection; we will need 5000 for our example. |
|
suspend=y |
This option can be set depending on whether we want to suspend the exectution of the VM until a debugging application connects. This is useful if we seek to understand what happens when a server starts. |
1、If we wish to make the VM wait for a connection before a full launch, we will need a command line such as this :
java …. -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=,suspend=y
2、If we want the VM to be fully executing and listening for a debugging application, we will require a command line such as this one :
java …. -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=,suspend=n
第2种模式是一种比较好的方式,VM采用侦听的方式等待调试程序的连接。
Configuring the launch of the remote virtual machine to debug的更多相关文章
- [SQL in Azure] Windows Azure Virtual Machine Readiness and Capacity Assessment
http://technet.microsoft.com/en-us/solutionaccelerators/dd537566.aspx http://blogs.technet.com/b/map ...
- [SQL in Azure] Provisioning a SQL Server Virtual Machine on Azure
http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-provision-sql-server/ Provi ...
- PatentTips - Improving security in a virtual machine host
BACKGROUND Computer viruses are a common problem for computer users. One typical mode of attack is t ...
- Configuring Network in CentOS 6.3 Virtual Box + Screenshots
Configuring Network in CentOS 6.3 Virtual Box + Screenshots Posted: May 23, 2013 in Uncategorized Ta ...
- [译] libvirt 虚机的生命周期 (Libvirt Virtual Machine Lifecycle)
翻译自:http://wiki.libvirt.org/page/VM_lifecycle 这篇文章描述虚机生命周期的基本概念.其目的在于在一篇文章中提供完整的关于虚机创建.运行.停止.迁移和删除 ...
- Internet Explorer for Mac the Easy Way: Run IE 7, IE8, & IE9 Free in a Virtual Machine
From link: http://osxdaily.com/2011/09/04/internet-explorer-for-mac-ie7-ie8-ie-9-free/ If you’re ...
- 60年代进程 80年代线程 IPC How the Java Virtual Machine (JVM) Works
小结: 1. To facilitate communication between processes, most operating systems support Inter Process C ...
- PatentTips - Safe general purpose virtual machine computing system
BACKGROUND OF THE INVENTION The present invention relates to virtual machine implementations, and in ...
- PatentTips - System and method to deprivilege components of a virtual machine monitor
BACKGROUND INFORMATION An embodiment of the present invention relates generally to virtualization pl ...
随机推荐
- 虚拟私有云(Virtual Private Cloud,专有网络)配置方式总结
虚拟私有云 虚拟私有云(Virtual Private Cloud)是用户在云上申请的隔离的.私密的虚拟网络环境.用户可以自由配置VPC内的IP地址段.子网.安全组等子服务,也可以申请弹性带宽和弹性公 ...
- FPC and Qt
Introduction There are a number of Qt bindings available: Qt3 A QtC based binding by Theo Another Qt ...
- 第三章 消息摘要算法--MD5
注意:本节内容主要参考自<Java加密与解密的艺术(第2版)>第6章“验证数据完整性--消息摘要算法” 3.1.消息摘要算法:防止消息在传递过程中被篡改. 原理:任何消息经过消息摘要算法后 ...
- 领扣-5 最长回文子串 Longest Palindromic Substring MD
Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...
- Backbone.js 的 View 中定义事件
使用 Backbone 的 View 时,可以象传统 jQuery 那样定义事件,$("selector").click(function(){...}).幸运的是 Backbon ...
- 【Scala】Scala-case-参考资料
Scala-case-参考资料 scala case_百度搜索 Scala School - 基础知识(续) scala case匹配值 - CSDN博客 scala入门教程:scala中的match ...
- Linux源码包安装过程及注意事项
众做周知RedHat Linux使用RPM包管理器安装rpm包,但是RPM包是由红帽编译打包的,通常相对于最新版落后了很多,甚至可能缺少我们所要使用的功能.如果你需要定制想要的软件功能.自定义安装路径 ...
- GIT 如何从另一分支合并特定的文件
是否遇到过这种情景: 您在一个分支上工作,发现该分支上的某些文件实现的功能已经在其他分支上实现了 但因为这两个分支实现不同的功能,因此不能进行简单的合并工作,但您又不想重复其他已经完成的工作 以下操作 ...
- 【机器学习】Logistic Regression 的前世今生(理论篇)
Logistic Regression 的前世今生(理论篇) 本博客仅为作者记录笔记之用,不免有非常多细节不正确之处. 还望各位看官能够见谅,欢迎批评指正. 博客虽水,然亦博主之苦劳也. 如需转载,请 ...
- WDCP安装可选组件的快捷命令
memcache的安装 wget -c http://down.wdlinux.cn/in/memcached_ins.sh chmod 755 memcached_ins.sh ./memcache ...