{"id":15135864,"url":"https://github.com/jetbrains/clion-debugger-plugin-stub","last_synced_at":"2025-10-19T15:32:09.337Z","repository":{"id":65982527,"uuid":"265806937","full_name":"JetBrains/clion-debugger-plugin-stub","owner":"JetBrains","description":"Minimalistic plugin with custom debugger stub","archived":false,"fork":false,"pushed_at":"2024-11-08T16:24:10.000Z","size":142,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-30T02:03:33.904Z","etag":null,"topics":["clion","clion-ide","debugger","debugging-tool","jetbrains","jetbrains-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JetBrains.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-21T09:24:59.000Z","updated_at":"2024-09-26T23:10:06.000Z","dependencies_parsed_at":"2024-03-04T12:09:54.363Z","dependency_job_id":null,"html_url":"https://github.com/JetBrains/clion-debugger-plugin-stub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fclion-debugger-plugin-stub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fclion-debugger-plugin-stub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fclion-debugger-plugin-stub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fclion-debugger-plugin-stub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JetBrains","download_url":"https://codeload.github.com/JetBrains/clion-debugger-plugin-stub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237163026,"owners_count":19265200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clion","clion-ide","debugger","debugging-tool","jetbrains","jetbrains-plugin"],"created_at":"2024-09-26T06:01:25.058Z","updated_at":"2025-10-19T15:32:04.029Z","avatar_url":"https://github.com/JetBrains.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Minimalistic plugin with custom debugger stub\n===\n\n[![incubator JetBrains project](http://jb.gg/badges/incubator.svg)](https://github.com/JetBrains#jetbrains-on-github)\n\n\nCompatibility Disclaimer\n---\nThis is an educational example, compatible with CLion 2024.2. Neither the example author nor JetBrains guarantees\ncompatibility with upcoming versions.\n\nHOW2USE\n---\n - Download and install CLion.\n - Follow the steps described at [Develop plugins for CLion](https://www.jetbrains.com/help/clion/develop-plugins-for-clion.html).\n - Open the project and click *Debug Plugin*. This will start CLion with the plugin installed.\n - In CLion:\n   - Create a project of type *C++ Executable*.\n   - Configure the toolchain as described [here](https://www.jetbrains.com/help/clion/quick-tutorial-on-configuring-clion-on-windows.html).\n   - Create a Run Configuration of type *Debugger-Stub*\n \nFunctionality Testing\n---\n - Start the debugger: Click the *Debug* button\n - Pausing the debugger and disassembly: Click *Pause Program* button\nThe execution is interrupted, and fake disassembly is shown\n - Execution stepping: Click *Step Over* button several times\n - Variables access: Evaluate *foo* expression. A string value *bar* is shown \n - Resume execution: Click *Resume program* button\n - Stop the debugger: Click the *Stop* button\n\nImplementation details\n---\nThere are two approaches to adding new debugger integrations in CLion.\n\n### Using the IntelliJ API\nThe official way for all IntelliJ-based IDEs is to:\n- implement `com.intellij.xdebugger.XDebugProcess` together with the necessary `com.intellij.execution.runners.ProgramRunner`\nfor the \"Debug\" action to pick up your debugger,\n- register a new `com.intellij.xdebugger.breakpoints.XLineBreakpointType`\nso that users can put breakpoints in the desired file types,\n- implement `com.intellij.xdebugger.attach.XAttachDebuggerProvider` for attaching to already running processes, and\n- make lots of other small customizations along the way.\n\nThe benefit is that you control each and every little detail, and use the official and stable platform API, which is also\n[open-source](https://github.com/JetBrains/intellij-community/tree/201/platform/xdebugger-api/src/com/intellij/xdebugger).\nOf course, the downside is that it's a huge amount of work with little to no relation to the real task - making a new native\ndebugger work in CLion.\nAlso, the whole new debugger stack should be integrated with the existing CLion C/C++ file types and run configurations,\nwhich is a whole other task on its own.\n\n### Using the CIDR / CLion API\nThis is the approach demonstrated in this example plugin. Instead of re-implementing the high-level code responsible \nfor integration with the IntelliJ Platform, here we implement a `com.jetbrains.cidr.execution.debugger.backend.DebuggerDriver`\nsubclass, which is a lower-level API responsible for communication with the actual debugger process.\n\nThe pros and cons of this approach are the opposite: you only implement the relevant business logic, but in order to do \nthat, you have to use the \"unofficial\" API, which is subject to change, as already stated before.\n\n\nFurther development steps\n---\nMajor functionality:\n  * Implement all the **//todo**s in `com.jetbrains.clion.bugeater.debugger.BugEaterDriver` class\n\nMinor things:\n  * Update *resources/META-INF/plugin.xml* with an actual name, description, etc.\n  * Update *resources/META-INF/pluginIcon.svg*.\n  * Update *resources/icons/bugEaterRunConfig.svg*. Please keep the size unchanged (16x16 px).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetbrains%2Fclion-debugger-plugin-stub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetbrains%2Fclion-debugger-plugin-stub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetbrains%2Fclion-debugger-plugin-stub/lists"}