In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "IDEA how to debug debug", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "IDEA how to debug debug" bar!
Version convention IntelliJ IDEA:2020.3.2
Interlude: IDEA has just released its mini version 2020.3.2. The launch picture has been replaced with the 20th anniversary picture. IntelliJ IDEA is 20 years old. The 2-day anniversary celebration is free for developers. Feel it:
Text
Debug debugging is not an unfamiliar concept for IT practitioners, and it is often used at work, which has nothing to do with beginner, intermediate, or senior programmers. There are many ways to debug programs, such as outputting logs, adding auxiliary variables, splitting function bodies, breakpoint debugging, and so on. This article will introduce breakpoint debugging, which is one of the most effective debugging methods. To be exact, this article is about debugging using IntelliJ IDEA breakpoints.
Debug is used to track the running process of the code, usually when an exception occurs during the running of the program, enabling Debug mode can analyze and locate the location of the exception, as well as the changes of parameters during running. In addition, we can also use the Debug pattern to track the running flow of the code to learn about excellent open source frameworks.
How important is breakpoint debugging?
As the saying goes, coding 5 minutes, debug2 hours, from this sentence can reflect the importance of debugging, after all, it takes up "most" of your time.
In order to truly reflect its importance, I "quoted the classics" and asked several bosses with experience in the industry to quote them:
Debugging skills are more important than coding skills, because you often spend more time on debugging than coding, and what you learn is more important than what you learn. Debugging skills are more important than programmers who can't debug. I'm sure you can't write any good software.
I have made a rough emphasis on all the key words, which shows its importance. Even the boss thinks so, let alone us? So, this article read O (∩ _ ∩) O ~
What is a breakpoint?
Suddenly asked, are you confused?
If you really want you to give a definition to a "thing" that you use every day, it will not be explained clearly for a while. Of course, the main road to simple, understand its essentials can be used skillfully is the last word. As a "serious" technical article, this paper naturally needs to describe the concept of breakpoint in words first.
Breakpoint: a place where a program is deliberately paused for debugging. It is a special tag attached to the source code that can trigger specific actions in debug mode, such as pausing execution, printing a thread stack, evaluating the value of an expression, variable tracking, and so on. Breakpoint setting and cancellation of manual management, if not manually handled (deleted) will always exist with the project.
❝
If you have read the first two articles, you can certainly explain why it has always been in the project. You are advised to refer to the elevator directly.
❞
It can be seen that the core meaning of the breakpoint is to pause the program, so that you can see the variables, IO, threads and other information of the online text at that moment, and then get a more in-depth understanding of the program, find the problem in time and trace the root cause of the error.
Breakpoint parameter
Breakpoint does not exist in isolation, it can also have parameters, thus customizing different breakpoint behavior, so that it can take effect under different conditions, this parameter is called breakpoint parameter.
We usually use more conditional breakpoints, which is the most typical application of breakpoint parameters. Of course, in addition to conditional breakpoints, other breakpoint types can also be customized. So what types of breakpoints can be used and customized? Then we will step into the main content of this article and begin to move on to the more interesting part.
Basic use of breakpoints
There should be no one who won't interrupt, even if you are the product manager (product manager lying gun, manual dog head).
The simplest and most direct way to break the point is to click the left mouse button in the leftmost window bar of which line of code you want to set the breakpoint, and when you are finished, you can see a small red dot, which means that the breakpoint is set successfully, and then click to cancel. It looks like this:
Because my IDEA interface is simple, I remove the "buttons" as much as possible, so I usually use a large number of keyboard shortcuts to operate IDEA, and breakpoints are often done with keyboard shortcuts. Of course, a lot of time also use the mouse, after all, the mouse processing still has its great advantages.
❝
Description: my shortcut key is Ctrl + Shift + B, only for your reference.
❞management breakpoint
Management breakpoints include adding and deleting breakpoints.
For a small number of breakpoints, it is OK to delete them with mouse clicks one by one. But if you hit a "large number" of breakpoints in the code (such as looking at the xxx source code), it is not realistic to find them one by one. After all, you may forget where the breakpoints are. At this point, a management page / window is particularly important. Such a window is provided in IDEA, and you can open it in many ways:
Menu bar mode: Run-> view breakpoints, the disadvantage is that the path is too long and troublesome Actions mode: double-click shift to bring up the Actions window, enter view breakpoints to open any breakpoint right mouse button: select more to open the management window. The disadvantage is: you have to find at least one breakpoint as a grip (of course, you can hit a point anywhere) debugging window: the opening mode will mention the shortcut key below: there is no doubt that this is my most recommended way.
On this management page, you can add, delete and modify breakpoints.
❝
Description: my shortcut key is Ctrl + Shift + F8, only for your reference
How does ❞run in debug mode?
Well, isn't that a little too simple?
There are many ways to start Debug mode, such as the bug icon button in the toolbar, the left click on the entry of the program method, the menu bar, the right-click menu bar, and so on. The following is a brief demonstration:
The Gif is too big to put on. Check the address: https://img-blog.csdnimg.cn/20210128073454666.gif
As far as I know, the most commonly used way for many students is to click on the bug icon in the upper right corner of the upper toolbar. Because I "don't have" this icon, I won't demonstrate it in the tutorial. Brother A usually uses shortcut keys to start the program 99% of the time, because I think it's the quickest and most convenient (not necessarily for you, of course).
My keyboard shortcuts are divided into two categories.
Run the currently selected entry class in the upper right corner. It has a set of shortcut keys Ctrl + Shift + Alt + enter:Run to run Ctrl + Shift + Alt +\: Debug runs because very often need to start the program from the new entrance, Spring Boot engineering development may not be experienced (only one entry), but in the tutorial, Demo when the program entry is often changing, so it is impossible to change the startup class every time, the efficiency is too low. For this reason, I set up a new set of shortcut keys Ctrl + Shift + Alt + [: Run run, mouse focus is located as the entrance Ctrl + Shift + Alt +]: Debug runs, mouse focus is at the entrance
In addition, to tell the difference between Run running and Debug running, in addition to looking at the bug icon in the upper right corner, it's a better way to see which console window is activated at the bottom. The advantage of looking at it this way is that even if the same application is launched multiple times, you can quickly tell which debug and which run.
Debug mode operation
It is worth mentioning that when debug mode runs, if no breakpoints are activated (for example, you have no breakpoints at all), the effect is the same as that of run mode startup (but the console window is different, so the location of the log output is not the same).
Detailed explanation of debugging window
Debugging window is our breakpoint debugging operation panel, it is very important to skillfully use this panel to improve efficiency and master more skills. Let's get to know it first:
There are a lot of buttons on this operator panel, and how proficient you are in debugging Debug is largely determined by your proficiency in operating this panel.
Debug button
The most commonly used row of buttons, essential for getting started.
There are nine buttons, which are explained from left to right:
1.Show Execution Point: go back to the currently active breakpoint. Effect: if your mouse is now over another page / category, click it to quickly "return to position"
2. Step Over step: also known as single-step debugging, one line goes down, if this line is a method, it will not enter it. This should be the most frequently used button, not one of them. Therefore, it is recommended to remember your keyboard shortcuts to improve efficiency.
3.Step Into step: enter the inside of the method body. The method here refers to your custom method or tripartite library method, which will not be entered into the official JDK method (such as System.out.println () above).
4.Force Step Into forced entry: can enter any method, including JDK. It is usually used only if you check the underlying source code.
5.Step Out step-out: it is used with (Force) Step Into. When you enter the method body through step into and figure it out, there are generally two options: step-by-step debugging, and step out (recommended)
6.Drop frame: go back to the call to the current method, and the values of all variables in the context go back to that time. The premise that the button can be clicked is that the current method has a superior method, and if you are in the main method, then the button is grayed out
7.Run to Cursor runs to the cursor: just put the cursor where you want the code to stop. This feature is so easy to use that it greatly relieves the dense breakpoint. It is highly recommended.
8.
Evaluate Expression expression Calculator: look, the icon is a calculator, so you can execute any legal expression here.
Trace Current Stream Chain tracks the current Stream flow: this icon can be lit and clicked only if the code stops on the Stream stream statement. This is the trump card level function provided by IDEA due to debugging Stream streams, which is explained in detail below.
This row of buttons is very important, even the most important, must be skillfully mastered, can greatly improve the efficiency of debugging code, self-testing is effective.
Service button
The leftmost vertical row is defined as the service button to serve the debugging process.
A total of 10, but all are relatively simple and easy to understand. Do the same from top to bottom:
Rerun xxx: close the current program and rerun Modify Run Configuration: as the name implies, modify the running configuration. The effect of clicking this button is the same as clicking the box in the upper right corner:
Click to bring up this configuration window:
Each run-time configuration is named and unique, isolated from each other. There are many items that can be modified in the running configuration, roughly as follows:
❝
Note: the page I screenshot may not be the same as yours, because I am using the latest version of IDEA, which has been modified in version 2020.3
❞Resume Program: recovery program. When the breakpoint is activated, the program "stops". Click this button to restore. The effect it gives is to jump to the next breakpoint (it seems easier to understand in this sentence), and if there is no breakpoint, the run is over. This button is very commonly used. Pause Program: pauses the program. Well, as long as you are stuck at the breakpoint, then the state is the state of Pause. At this time there is a doubt, is this button always gray unclickable state? What's the use? I looked at it on the Internet, and almost no one can explain its function. Here, Brother A tries to explain it to you, using a picture to make it clear and obedient to you:
Stop xxx: no explanation
View Breakpoints: opens the breakpoint management window. The use of this window has been explained in detail.
Mute Breakpoints: this button is interesting to make all breakpoints grayed out, that is to say, invalidate them. It is a batch operation, the operation object is all breakpoints, but not for a particular one. If you don't want to delete all breakpoints now, but don't want them to stop you, you can use this button to implement
Get Thread Dump: get the dump of the current thread, and you can view the status of the current thread. As shown below:
The current state of the child thread is Runnable
Settings: opens the settings menu. It belongs to advanced use. What effect will each item have after it is opened? please explain it below.
Pin tab: if you debug the xxx program frequently, it will be more efficient to pin it on the method call stack
Displays all methods passed by the current method (at the top of the stack).
Description: click the small funnel icon in the upper right corner to not show the method of the class library, but only show the method written by yourself, which is convenient for debugging
Variable region Variables
In this area, you can view the values of all variables within the context of the current breakpoint (even if you are not in this class, you can click to see them), including static static.
It is worth noting that the variable IDEA in this area will automatically call its toString () method, so if you encounter a normal operation only output a log, debug output multiple sentences of this case is likely to be the case.
Watches variable tracking
Sometimes there are a lot of variables, and you only need to focus on a few variables to use Watches.
In addition to the above, what other dynamic change variable value set Value, jump to the source code jump to source and so on are very practical functions, which leave you to develop and experiment.
Why didn't the debug window open automatically?
Some students have encountered this situation: obviously the breakpoint is activated (the program is paused), but that "operation panel" did not come out, how to break?
Needless to say, check that your configuration item is checked. This state IDEA is checked by default, generally don't worry about it.
The strange tricks of breakpoint debugging
Finally, standing at the level of use, I would like to introduce some very practical "masturbation tricks" to you, these tips can be used.
Force return (interrupt debug)
Scenario description: during debugging, when I went to step 3, I found a problem, and I didn't want to finish the follow-up process (for example, because there is a bug follow-up process, there will be data deletion operations, etc.). What to do at this time?
Click, Stop program. Yes, I did the same thing for a long time, and I was able to achieve my goal. Until I found a more elegant method: Force Return, the effect is to force the return method to return a value (give a value yourself) to avoid subsequent processes.
Conditional breakpoint
The activation conditions that specify breakpoints can be called conditional breakpoints. In general, given an evaluation expression under the line breakpoint, the result is that true activates the breakpoint, which is the most common way. Because there is already a case above, it is omitted here.
Multithreaded debugging
Needless to say, the benefits of multithreaded programs are notoriously difficult to debug, such as this one:
Public static void main (String [] args) {
/ / put a total of 3 "tokens"
CyclicBarrier cyclicBarrier = new CyclicBarrier (3)
/ / simulate multiple threads to rob
For (int I = 0; I
< 10; i++) { new Thread(() ->{
Try {
String name = Thread.currentThread () .getName ()
System.out.println (name + ", prepare to grab tokens")
CyclicBarrier.await ()
System.out.println (name + ", grabbed")
} catch (Exception e) {
}
}, "thread" + I) .start ()
}
}
At this point, if you want to study the implementation of the await () method, the prerequisite is that multiple threads enter, so you need hold to live in multiple threads. If you just hit a normal line breakpoint in the await () line, the result would look like this:
All threads are in Running state, which shows that this is impossible, because there are only three other threads in total, and you have to wait for the rest, so this is not a real execution scenario at all, and it is impossible to trace it into the await () method to explore its implementation.
In order to simulate this scenario for debugging, the breakpoint blocking condition is set to this:
Run the program again, and the thread is as follows:
Fast evaluation of expression
We all know that Evaluate Expression in the debug panel can calculate the value of expressions / variables, but after all, it is a bit troublesome to pop a window. In fact, there is a more convenient way:
Operate with the mouse, the efficiency is improved exponentially. This operation is: mouse pointer selection expression (IDEA intelligent automatic selection) + left mouse button click. Of course, if you want to execute custom expressions that do not exist in the code, you must adjust the window to operate.
Stream stream debugging
The popularity of Java 8 completely brings streaming programming into our field of vision. There are many advantages to programming with Stream, but what has been criticized for being difficult to read and debug, especially the latter.
In order to debug it, we often need to insert other breakpoints and analyze each transformation in the flow without hassle. Fortunately, IDEA provides the "ability" to deal with this pain point: when the debugger stops before or within the Stream API call chain, clicking the Trace Current Stream Chain icon can be displayed graphically in a "very good-looking" way, which is clear at a glance:
Actively throw an exception
Requirement scenario: you have written a global exception component, and now you want to test how it works, then you need to take the initiative to throw this exception, which looks like this:
/ / take the initiative to throw one in the program.
Throw new NullPointerException ()
/ / or build an expression
Int I = 1max 0
This practice has a certain degree of code intrusiveness, and it has to be deleted after use. In fact, IDEA offers a more elegant solution:
Having mastered the basic skills of IDEA breakpoint debugging, let's go to the deep water area of this article: breakpoint type. The difficulty is not high, it is still a matter of use, but because many students do not know it, it is a good material for you to overtake.
Four major breakpoint types
For the break point, it is estimated that most students will only click on the left side of the mouse in this most basic way. So, if you see this subtitle, you'll probably have to be confused again. What? Are there any other kinds of breakpoints?
If you only click "Little Red Dot" on the left side of the code, then Gaga is dry, turning 720 degrees in the air and tumbling backward for three and a half weeks. An instigated contestant, then sit tight and get ready to start.
This posture may help you locate more than 50% of the problem, but what about the other half of the case? Such as for loop debugging, Stream stream debugging, lambda debugging, exception debugging and so on, it is difficult or even impossible to handle with that "instigation" way. Breakpoints help us to quickly locate the problem, different scenarios with the right breakpoint will be able to get twice the result with half the effort.
Unexpectedly, IDEA provides us developers with very breakpoint types to cope with debugging in different scenarios. Using the right type of breakpoint in the corresponding scene can greatly improve the efficiency of debugging, so that when others work overtime, efficiency is time, and time is life.
As shown in the figure, IDEA divides breakpoints into four types (there are only three types in the screenshot):
Line breakpoint (line breakpoint): a small red circle in the picture. As the name implies, set the breakpoint Field watchpoint (attribute breakpoint) on the specified line of code: small red eyes in the figure. A breakpoint on a property of a class (static or is not static) that activates Method breakpoint (method breakpoint) when the attribute is read and written: the small red diamond in the figure. Marked on the line of the method signature, the Exception breakpoint (abnormal breakpoint) is activated at the entrance / exit of the method execution: red Lightning. This is a special but useful breakpoint that activates the exception when the program throws a specified exception. Unlike other breakpoints, exception breakpoints are global to the project and do not need to be typed on a specific line
Now it's time to "gnaw hard bones". Come on.
Line breakpoint Line breakpoint
The most widely used type of breakpoint, which is usually used in most cases.
The Gif is too big to put on. Check the address: https://img-blog.csdnimg.cn/20210128011543377.gif
You can see from the tutorial that there are a lot of settings for this breakpoint, that is, there are a lot of breakpoint parameters that can be configured to understand.
Breakpoint parameter
Since this is the first type of breakpoint parameter to be introduced, it will be described in more detail so that there is no need to repeat the parameters of the same function later. Against this screenshot page:
Enabled: no explanation. But it should be noted that if this item is not checked, the little red dot will not disappear, but will change from solid to hollow, of course, this Suspend will not be moved in general: it is well known that when the breakpoint is activated, it will block the continuation of the program, thus blocking the current thread. But were you surprised when you found out it was a check box? And, and you can uncheck it at all, what's the difference:
All (default): blocks all threads in the program
Thread: blocks only the thread where the current breakpoint is located
As shown in the figure above, uncheck Suspend: thread 14 and thread 15 are running normally and "unblocked"
The Gif is too big to put on. Check the address: https://img-blog.csdnimg.cn/20210128062330308.gif
As shown above, check Suspend-All: at the breakpoint, all threads are blocked, give me a unified wait.
If unchecked: activities related to this breakpoint (such as logging, etc.) are still normal, but do not block the process if checked: as shown in the figure above, the thread that checked Suspend-Thread:method1 is blocked, but it does not affect another thread to call method2.
Just imagine, since "checking Suspend-Thread" has less impact, why does IDEA choose All instead of Thread by default? The reason is this: the purpose of debugging is to "slow down" the program, preferably to rest to facilitate the analysis of the problem. Otherwise, if other threads continue to execute, they may request to change this data and then change that data, increasing uncontrollability. The increase in uncertainty greatly increases the difficulty of debugging and locating the problem, so it is easy to worry about the last "synchronization lock", so it is reasonable to select Suspend-All by default.
❝
Note: many times we need to use the local connection test environment break point for remote debugging, if you are strongly recommended to use Thread mode under this case, otherwise you know
❞Condition: the condition under which the breakpoint is activated. You can write an expression here, and this breakpoint will be activated only when the expression returns true. Strictly speaking, the breakpoint does not belong to a breakpoint type, but is determined by the breakpoint parameters. Many types of breakpoints can be conditioned Log: it has three options, which is checkbox. That is to say, you can choose all or none of them, and Breakpoint hit message is not selected by default: output prompt log when breakpoint is activated Stack trace: output program call stack information when breakpoint is activated Evaluate and log: select the value that needs to be output evaluation expression. You can choose the currently reachable variable, such as the main function input parameter args in this example: the breakpoint will be removed immediately after the breakpoint is activated, that is, the so-called temporary breakpoint. Let's introduce it below.
And the rightmost part of the window:
In the sense of name, a series of filters: filter instances, filter classes, filter callers, etc., which are almost impossible to use (at least I haven't used it yet), so I just mentioned it.
Working with scen
Line breakpoints are generally used together with single-step debugging, especially in looking at the frame source code, positioning basic issues, etc., is the most need to master a type of breakpoint, non-negotiable.
Temporary breakpoint Temporary line breakpoint
It also belongs to a kind of line breakpoint, but the parameters are different. Because it is quite special, so it is simply picked out and said. Create a normal line breakpoint, and then check the Remove once hit check box to create a temporary line breakpoint. The effect is as follows:
The actual use of this type of breakpoint is actually very rare.
Attribute breakpoint Field watchpoint
Such breakpoints are typed on attributes, and both member and static properties are available. It is not a little red dot, but a red "little eye".
Breakpoint parameter
As shown in the figure, this breakpoint type has a unique watch parameter, and the two optional values mean:
Filed Access: read this property (regardless of writing) Filed madification: use the scene when writing this property (regardless of reading)
When you want to know who the xxx attribute is assigned to, because the program is too complicated to know where to hit the breakpoint and where to start tracking, it is very convenient to use the breakpoint of the attribute type at once.
Method breakpoint Method breakpoint
The breakpoint must be typed on the line of the method signature, and the color shape is a small red diamond.
Breakpoint parameter
There are three optional values for Watch:
Emulated: simulation. Purpose: improve debugging performance, so it is used by default. Official recommendation: disable this option only when debugging remote code or setting breakpoints in native methods or classes that do not have line number information Method entry: activate breakpoints Method exit when entering methods: activate breakpoints ❝when going out methods
If both entry and exit are checked, breakpoints will be activated after entering and before going out
❞usage scenario
For this type of breakpoint, you might say that it is useless. After all, you can achieve the same effect by hitting a line breakpoint at the beginning and end of the method, so there is no need to make a separate type.
In fact, its killer-level usage scenario is to type this type of breakpoint on the interface method, so that no matter which implementation class method is called, the breakpoint will be activated.
Abnormal breakpoint Exception breakpoint
It's niche, but it doesn't mean it's not important. In my understanding of it is relatively small, perhaps most students do not know how to make an abnormal breakpoint, because it can not be easily done with a mouse click.
The exception breakpoint described above is a global breakpoint type, so it cannot be clicked directly at the code, but can only be added uniformly in the management window:
Compared with other breakpoint types, there are at least the following differences:
Creating a breakpoint can only be created through the breakpoint management window, but not by mouse click. after it is created, there will be no display in the code bar (no small red icon). It will not appear until it is activated that a small red lightning exception breakpoint acts on the global: this breakpoint parameter will be activated if NullPointException is thrown anywhere in this example.
Notification has two optional values:
Catch excetion: breakpoint Uncatch excetion is activated only if you try-catch this exception: breakpoint is activated only if you are not try-catch.
Both are checked by default, which means that breakpoints are activated whenever this exception occurs.
Working with scen
Once you know the role and trigger conditions of the exception breakpoint, you can use the scenario. For example, when your program throws an exception, but at 01:30 you don't know which line of code caused it, you can quickly locate the problem by adding exception breakpoints.
Comparison of four breakpoint icons
Each breakpoint type has its own icon and has a different state. I took a comparative picture from the official website, summed it up very well, and shared it with you here:
Remote debugging (remote Debug)
At present, most of them are micro-service architecture, and each micro-service generally has more than N upstream / downstream dependencies, which brings great difficulties to debugging. After all, it is almost impossible for you to enable all the dependencies locally and debug with IDEA. Therefore, remote debugging is coming, and it is a sharp tool for debugging distributed systems.
Remote debugging: as the name implies, use local IDEA to debug remote code (usually in QA environment, it is impossible to open debugging port in online environment). So how do you turn on remote debugging?
Opening step
It only takes two steps to start remote debugging:
Step 1: let the remotely deployed application support remote debugging, that is, expose the remote debugging port. The method is to add the corresponding JVM parameters when the application is started, and the parameters vary with different JDK versions.
JDK 9 debug_port JDK 4:-Xdebug-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=$ {debug_port} JDK 3-:-Xnoagent-Djava.compiler=NONE-Xdebug-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=$ {debug_port}
Step 2: create a remote running configuration with IDEA and fill in the debug port exposed by ip + of the remote host. The operation path is: Edit Configurations-> Add New Configuration->
Everything is ready. Click debug to run, and the following words can be seen in the console to prove that your link is successful:
It is worth noting that when debugging remotely, make sure that your local code is exactly the same as the remote code and has achieved the best results.
How does traditional Tomcat enable remote debugging?
If you are a Spring Boot application, you can add the JVM parameter to jar-jar. What if you want to deploy using the traditional tomcat method? At this point, find the startup script startup.sh of traditional tomcat:
#! / bin/sh
Os400=false
...
PRGDIR= `dirname "$PRG" `
EXECUTABLE=catalina.sh
...
Exec "$PRGDIR" / "$EXECUTABLE" start "$@"
To add our JVM parameter, we just need to add a variable value before exec xxx (take JDK8 as an example):
Specific port number of JPDA_OPTS='-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address='
❝
Note: this key name must be JPDA_OPTS.
❞
If you are curious, you may have to ask: why just add a JPDA_OPTS parameter? Also do not see exec xxx use it, in fact, it is not, the following simple explanation, do not expand.
When exec executes, it refers to the variable $EXECUTABLE, which represents the file catalina.sh, which contains a large number of variable judgment scripts, including, of course, the interpretation of JPDA_OPTS:
#! / bin/sh
Cygwin=false
Darwin=false
...
If ["$1" = "jpda"]; then
If [- z "$JPDA_TRANSPORT"]; then
JPDA_TRANSPORT= "dt_socket"
Fi
If [- z "$JPDA_ADDRESS"]; then
JPDA_ADDRESS= "localhost:8000"
Fi
If [- z "$JPDA_SUSPEND"]; then
JPDA_SUSPEND= "n"
Fi
If [- z "$JPDA_OPTS"]; then
JPDA_OPTS= "- agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
Fi
CATALINA_OPTS= "$JPDA_OPTS $CATALINA_OPTS"
Shift
Fi
... Thank you for your reading, the above is the content of "IDEA how to debug debug". After the study of this article, I believe you have a deeper understanding of how IDEA debugs debug, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.