- Hands-On Microservices with Kotlin
- Juan Antonio Medina Iglesias
- 274字
- 2021-06-30 19:10:55
Debugging
IntelliJ IDEA provides a very powerful but simple to use the debugger that we can use to develop our microservices. If we go back to our ExampleService class, we can click on the gutter in the same line that our getHello method is and we can create a breakpoint, this will be visualized as a red dot on the gutter. Alternatively, we can use the keybinding Ctrl + F8 in Windows, command + F8 on a Mac.
Now, we can go back to the application class, click on the Kotlin icon but choose to debug instead of run. If we request again the URL http://localhost:8080/user/Kotlin, the debugger should stop the application and show our breakpoint.
When the application is stopped, we can see in the middle-bottom side of the screen, the Debugger window:

In this window on the left-hand side, we can see a section named Frames that allows us to navigate through the stack trace to the point where we were stopped.
On the right-hand side, we can see the variables and their value in the current scope of the debugger. Right-clicking on this allows us to define watches that will monitor values using expressions, or inspect objects to see all attributes and methods for existing values.
On the top, near the tabs, we have a vertical bar that contains buttons to navigate through the execution of the debugger, for example, to step in and out of functions calls, or continue running to the current cursor.
We can invoke the debugger from Maven phases and goals, right-click on the Maven Projects Windows to a phase or goal and choose Debug.
- Visual Basic編程:從基礎到實踐(第2版)
- Unity 2020 Mobile Game Development
- 信息安全技術
- Java深入解析:透析Java本質的36個話題
- Reactive Programming With Java 9
- INSTANT Passbook App Development for iOS How-to
- 大數據分析與應用實戰:統計機器學習之數據導向編程
- PHP 7從零基礎到項目實戰
- 深入實踐Kotlin元編程
- Python從入門到精通(第3版)
- Kotlin Programming By Example
- Mudbox 2013 Cookbook
- Drupal Search Engine Optimization
- Web開發新體驗
- C/C++程序設計教程