Debugging Java programs remotely using Eclipse JPDAThis article describes the use of Eclipse JPDA to debug a remotely running Java program in the Eclipse development environment.Please follow the steps below (I have successfully debugged in Eclipse 3.2, JDK 1.5_08) environment.1. When starting the Java program, in the
Java Log Framework log system relationship detailed
When we first contacted the Java Log framework and log system, I was completely confused about their relationship, and it was not clear what kind of system they were using. Mak
Java remote Debugging is the principle of two VM communication between the debug protocol, and then to achieve the purpose of remote debugging. You can communicate between the two by using a socket.First, the virtual machine of the debug program starts debug mode on startup and starts the
Java BASICS (new features and reflection of myeclipse, debug, junit, and JDK5)
Mind Map
1. install and use myeclipse
* Eclipse: a free development tool
* Myeclipse: it is a paid plug-in, cracking myeclipse,
** Installation directory requirements: Chinese characters and spaces are not allowed
** After the installation is complete, select a workspace which cannot contain Chinese characters or spaces.
* Cracki
bug you want to diagnose, you can copy it to a managed environment, such as a temporary server with the latest database backup. When you destroy the cause, collect the new data, and refine the assumptions, the clues to the real cause of your bug will become clearer.Think clearly about the care and focus that complex systems require. The use of structured diagnostic procedures to guide inspection can save time and avoid frustration. Most importantly, it is very useful. The next time you're stuck
Enable the remote debug mode of JVM and add the following parameters when starting JVM:
// Non-blocking mode. After JVM is started, attach the JVM to the server at any time.-xdebug-xnoagent-xrunjdwp: Transport = dt_socket, address = 11312, Server = Y, suspend = N // block Debug. After JVM is started, you need to remotely connect attach to the corresponding port to continue JVM execution. -Xdebug-xnoa
Log, is the software operation process, the various types of operations important information records. Log tracking, no matter what kind of project, is a very important part of the project is related to maintenance and troubleshooting, plays a pivotal role. In the process of project development, the record rules of the log will also affect the difficulty of the m
1, about logging is the development of essential knowledge, now give you a detailed talk about how to record log information; the principle is not much said to see the actual operation
2, configure the log4j file: The specific configuration of what means to do not say a look at the understand Hey
Log4j.rootcategory=debug,stdlog,errorlogLog4j.appender.stdout=org.apache.log4j.consoleappenderLog4j.appender.std
Error situation diagram:Solution to the problem:Direct Click Ignore: Don ' t tell me againAnswer from the Internet ~ ~I had the same error message in Eclipse 3.4.1, SUN jvm1.6.0_07 connected to Tomcat 6.0 (running in Debug-mode on a dif Ferent machine, Sun jvm1.6.0_16, the debug connection do work correctly). Window---Preferences-----Compiler---Classfile Generation: "Add line number attributes to generate D
Org.apache.log4j.PropertyConfigurator;public class Externalplaintest {static Logger Logger = Logger.getlogger (Externalplaintest.class);public static void Main (String args[]) {Propertyconfigurator.configure ("Plainlog4jconfig.xml");Logger.debug ("Here is some debug");Logger.info ("Here is some info");Logger.warn ("Here is some warn");Logger.error ("Here is some error");Logger.fatal ("Here is some fatal");}}You can download an example that uses this
Enable the remote Debug mode of JVM and add the following parameter when starting JVM: // non-blocking mode. After jvm is started, attach to the server at any time-Xdebug-Xnoagent-Xrunjdwp: transport = dt_socket, address = 11312, server = y, suspend = n // block debug. After JVM is started, the JVM will continue to execute this operation only when attach is remotely connected to the corresponding port. -Xde
Java needs to be installed, the environment must be built well
After installing the Java JDK, set it in the system variable block:
New system Variable:
Variable name: [java_home]
Variable value: [C:\Program files\java\jdk1.7.0_51]
Special Note: My JDK is installed in this location C:\ProgramFiles\Java\jdk1.7.0_51 so ju
The debug debugs in Eclipse are described here:First, right-click the project select Debug AS-debug on server or click the small insect icon in the server panel to start debug mode.Run the Web project, go to the place where you need to debug, add a breakpoint in the code tha
My colleague encountered a very difficult problem. When I called netwebservice in Java, the non-parameter method was called successfully. Every time I called a method with parameters, the WebService log on our side recorded that the parameter was null, and myself. netProgramThere is no problem with the call. You can find the following information:
Add:
[Soaprpcmethod (use = soapbindinguse. literal, Action
Java itself supports debugging and provides a simple debugging tool--jdb, similar to the powerful Gdb,jdb is also a character interface debugging environment, and support the setting of breakpoints, support thread-level debugging.
1. Add to the process startup parameters on the server:
-xdebug-xrunjdwp:transport=dt_socket,address=6666,server=y,suspend=n
Connecting to the debugging services provided by myhost:6666
-xdebug is to notify the JVM
Before reading this article, I recommend that you take a look at the Eclipse Shortcuts manual, and my eclipse version is 4.2 Juno.
Three points first.
Do not use SYSTEM.OUT.PRINTLN as the debugging tool to enable verbose logging levels for all components use a log analyzer to read log 1, conditional breakpoints
Imagine how we normally add breakpoints, usually by double-clicking the left side of the line nu
:// S2.51cto.com/wyfs02/m02/95/21/wkiol1kr11dyteumaaanrrx-wxe775.png-wh_500x0-wm_3-wmp_4-s_585189790.png "/>2.jdb Debug Code and PauseBoth Ps:jdb,jps and Sa-jdi.jar are in the JDK Lib and bin directories650) this.width=650; "title=" QQ picture 20170509225459.png "alt=" wkiol1kr2gfzmzr_aablrjsxstm844.png-wh_50 "src=" https:// S5.51cto.com/wyfs02/m01/95/21/wkiol1kr2gfzmzr_aablrjsxstm844.png-wh_500x0-wm_3-wmp_4-s_3100643040.png "/>3. Use JPS to view the
-wxe775.png-wh_500x0-wm_3-wmp_4-s_585189790.png "alt=" Wkiol1kr11dyteumaaanrrx-wxe775.png-wh_50 "/>2.jdb Debug Code and PauseBoth Ps:jdb,jps and Sa-jdi.jar are in the JDK Lib and bin directories650) this.width=650; "title=" QQ picture 20170509225459.png "Src=" https://s5.51cto.com/wyfs02/M01/95/21/wKioL1kR2GfzmZr_ Aablrjsxstm844.png-wh_500x0-wm_3-wmp_4-s_3100643040.png "alt=" Wkiol1kr2gfzmzr_aablrjsxstm844.png-wh_50 "/>3. Use JPS to view the
process space. The sending of logs is mostly a synchronization process. This log service is typically used for debug tracing and crash recovery because it is able to synchronously reflect the state of the system Running.The log system established in this paper is basically the second type, but it is different. The log
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.