Skip to content

runtime-pivot is a runtime enhancement toolkit that provides convenient features for developers when debugging code.

License

Notifications You must be signed in to change notification settings

wl2027/runtime-pivot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

__________ ____ _____________________.___   _____  ___________        __________._______   _______________________
\______   \    |   \      \__    ___/|   | /     \ \_   _____/        \______   \   \   \ /   /\_____  \__    ___/
 |       _/    |   /   |   \|    |   |   |/  \ /  \ |    __)_   ______ |     ___/   |\   Y   /  /   |   \|    |   
 |    |   \    |  /    |    \    |   |   /    Y    \|        \ /_____/ |    |   |   | \     /  /    |    \    |   
 |____|_  /______/\____|__  /____|   |___\____|__  /_______  /         |____|   |___|  \___/   \_______  /____|   
        \/                \/                     \/        \/                                          \/         

runtime-pivot-plugin

Version Downloads Downloads Downloads Downloads Downloads Downloads GitHub Gitee

Introduction

English:

runtime-pivot is a runtime enhancement toolkit that provides convenient features for developers when debugging code.

The current features are divided into four dimensions:

  • program: Analyzes instrument data during program runtime.
  • class: Analyzes bytecode information of classes in memory during program runtime.
  • session: Analyzes and manipulates code invocation information during debugging sessions in program runtime.
  • object: Analyzes and manipulates object memory during program runtime.

Comparison with similar tools:

runtime-pivot Arthas JProfiler
Usage Debugging tool for development phase Online issue diagnosis tool Performance analysis and reporting tool
Features Analysis and memory operations at specific breakpoints Diagnosis and troubleshooting for JVM issues Performance tuning and reporting for JVM

Detailed operation documents: https://github.com/wl2027/runtime-pivot

中文:

runtime-pivot 是一个运行时增强工具集,为开发人员在调试代码时提供便捷的功能.

当前功能分为四个维度:

  • program 分析程序运行时instrument数据
  • class 分析程序运行时内存类字节码信息
  • session 分析和操作程序运行中调试会话的代码调用信息
  • object 分析和操作程序运行时对象内存信息

类似工具差异说明:

runtime-pivot Arthas JProfiler
定位 开发阶段的调试工具 线上问题诊断工具 性能分析和报告工具
特点 针对特定断点的分析和内存操作 针对JVM的问题诊断和定位 针对JVM性能调优和报表分析
...

详细操作文档: https://github.com/wl2027/runtime-pivot

Features

  • program
    • View the runtime classLoader tree structure information. 查看运行时的classLoader树结构信息.
    • View the runtime classLoader loaded classes tree structure information. 查看运行时的classLoader加载类的树结构信息.
    • View the runtime transformers list information. 查看运行时的transformers列表信息.
  • class
    • View the runtime class loading chain information. 查看运行时class加载链路信息.
    • Dump the runtime class bytecode information. 转储运行时class字节码信息.
  • session
    • Monitor the runtime code invocations. 监控运行时代码调用.
    • Operate the runtime breakpoints list. 操作运行时断点列表.
  • object
    • View the runtime object memory layout. 查看运行时对象内存布局.
    • Dump the runtime object JSON data. 转储运行时对象json数据.
    • Load JSON data to update the runtime object. 加载json数据更新运行时对象.

Using The Plugin

open attach agent.

(Whether to enable the program, class, and object functions of runtime-pivot for the project program)

0.attach_agent.gif

Using the open-source project xxl-job as an example, run the program and enter the breakpoint. 以开源项目xxl-job为例,运行程序并进入断点。

1.1 View the runtime classLoader tree structure information, the operation result is printed to the console. 查看运行时的 classLoader 树结构信息,操作结果打印到控制台。 1.1 CLT.gif

1.2 View the runtime classLoader loaded classes tree structure information, the operation result is printed to the console. 查看运行时 classLoader 加载类的树结构信息,操作结果打印到控制台。 1.2 CLTCT.gif

1.3 View the runtime transformers list information, the operation result is printed to the console. 查看运行时 transformers 列表信息,操作结果打印到控制台。 1.3 TRS.gif

2.1 View the runtime class loading chain information, applicable to class files, search boxes, and runtime objects. The operation result is printed to the console. 查看运行时 class 加载链路信息,可作用于类文件、搜索框、运行时对象,操作结果打印到控制台。 2.1 CPS.gif

2.2 Dump the runtime class bytecode information, applicable to class files, search boxes, and runtime objects. The dump path is the .runtime directory of the current project and is printed to the console. 转储运行时 class 字节码信息,可作用于类文件、搜索框、运行时对象。转储路径为当前项目的 .runtime 目录,并打印到控制台。 2.2 CFD.gif

3.1 Monitor runtime code invocations, outputting overall time and time distribution between breakpoints. 监控运行时代码调用,输出总体时间和断点间时间分布。 3.1 MT.gif

3.2 Operate the breakpoint list at runtime, output the breakpoint list information of the currently selected stack frame, click to navigate to the code location, and double-click pop to select the breakpoint stack frame. 操作运行时断点列表,输出当前选择栈帧的断点列表信息,单击可导航至代码位置,双击pop选择断点栈帧. 3.2 SL.gif

4.1 View the runtime object memory layout, including object size, occupied size, and object header information. 查看运行时对象内存布局,包括对象大小、占用大小、对象头信息。 4.1 OI.gif

4.2 Dump the runtime object's JSON data. The dump path is the .runtime directory of the current project and is printed to the console. 转储运行时对象的 JSON 数据,转储路径为当前项目的 .runtime 目录,并打印到控制台。 4.2 OS.gif

4.3 Load JSON data to update the runtime object. The default path is the .runtime directory of the current project. When loading collection data, empty collections will lose their generics. 加载 JSON 数据更新运行时对象,默认路径为当前项目的 .runtime 目录,加载集合数据时空集合会擦除泛型。 4.3 OL.gif

FAQ

  1. If the IDEA program fails to start after installing the plugin, please set Attach Agent in Settings/Preferences > Tools > Runtime-Pivot Configuration to false. 如果安装插件后IDEA程序启动失败,请将 Settings/Preferences > Tools > Runtime-Pivot Configuration 中的 Attach Agent 设置为false ![img.png](doc/faq/1 error start.png) The occurrence of this situation may be caused by spaces, Chinese characters or illegal characters in the agent path. Issues can be submitted for problem investigation. 这种情况的出现可能是agent路径有空格或者中文或者非法字符导致的,可以提交issue以进行问题排查 0.attach_agent.gif

Compatibility

  • Android Studio
  • AppCode
  • CLion
  • DataGrip
  • GoLand
  • HUAWEI DevEco Studio
  • IntelliJ IDEA Ultimate
  • IntelliJ IDEA Community
  • IntelliJ IDEA Educational
  • MPS
  • PhpStorm
  • PyCharm Professional
  • PyCharm Community
  • PyCharm Educational
  • Rider
  • RubyMine
  • WebStorm

Installation

  • Using the IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "runtime-pivot" > Install

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...

Restart the IDE after installation.

Contributing

Welcome to contribute to the project! You can fix bugs by submitting a Pull Request (PR) or discuss new features or changes by creating an Issue. Look forward to your valuable contributions!

欢迎参与项目贡献!如您可以通过提交Pull Request(PR)来修复bug,或者新建 Issue 来讨论新特性或变更,期待您的宝贵贡献!


Plugin based on the IntelliJ Platform Plugin Template.

About

runtime-pivot is a runtime enhancement toolkit that provides convenient features for developers when debugging code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages