Development Approaches
There are two main approaches to developing with Ghidra:- User Scripts and Extensions - For writing custom scripts and plugins
- Advanced Development - For developing the Ghidra tool itself
User Scripts and Extensions
For developing user scripts and extensions, you have two options:Option 1: GhidraDev Eclipse Plugin
The GhidraDev plugin provides a complete Eclipse-based development environment. Location:Extensions/Eclipse/GhidraDev/ in your Ghidra installation
Requirements:
- Fully built Ghidra installation (download from Releases)
- Eclipse IDE
- Install Eclipse IDE for Java Developers
- Follow the instructions in the GhidraDev directory
- Install the GhidraDev plugin into Eclipse
- Create a new GhidraDev project
Option 2: Visual Studio Code
Ghidra also supports Visual Studio Code for script development. For Script Editing:- Click the Visual Studio Code icon in the Script Manager
- Ghidra will open the script in VS Code with appropriate configuration
- Open a Ghidra CodeBrowser window
- Navigate to Tools → Create VSCode Module project
- Follow the prompts to create a fully-featured VS Code project
Both GhidraDev and Visual Studio Code integrations only support developing against fully built Ghidra installations, not source repositories.
Advanced Development (Eclipse)
To develop the Ghidra tool itself, Eclipse is highly recommended. The Ghidra development process has been highly customized for Eclipse.Prerequisites
-
Complete the build process first:
- Follow the Building Ghidra guide
- Ensure the build completes without errors
-
Install Eclipse IDE:
- Download Eclipse IDE for Java Developers
- Install and launch Eclipse
Setup Process
Prepare Development Environment
Run the following Gradle command from the Ghidra source directory:This command:
- Prepares the development environment (
prepdev) - Generates Eclipse project files (
eclipse) - Builds native components (
buildNatives)
Import Projects into Eclipse
- Open Eclipse
- Go to File → Import…
- Select General | Existing Projects into Workspace
- Click Next
- Set the root directory to your Ghidra source repository
- Check “Search for nested projects”
- Click Finish
Development Languages and Tools
Ghidra development involves several languages and technologies:Primary Language
- Java - The main language for Ghidra development
Secondary Languages
- C++ - For native components
- Sleigh - For processor language specifications
- Python 3 - For scripting and the Debugger
- Jython 2.7 - For legacy scripting support
Development Tools
- IDE: Eclipse (recommended for core development)
- Build System: Gradle
- Source Control: Git
Specialized Development Areas
PyGhidra Development
PyGhidra development uses the PyDev plugin for Eclipse.Prepare PyGhidra
build/venv/ and installs an editable PyGhidra module.Configure PyDev Interpreter
- Install the PyDev plugin in Eclipse
- Go to Settings → PyDev → Interpreters → Python Interpreter
- Click New…
- Click Browse for python/pypy exe
- Choose
build/venv/bin/python3 - Enter a name for the interpreter
- Check Select All and press OK
- Click the Predefined tab, then New…
- Choose
build/typestubs/pypredef - Click Apply and Close
GhidraDev Eclipse Plugin Development
To develop the GhidraDev Eclipse plugin itself: Prerequisites:- Eclipse PDE (Plug-in Development Environment)
- Available via Eclipse marketplace or included in “Eclipse IDE for RCP and RAP Developers”
Debugger Development
The Ghidra Debugger uses a Python3 and protobuf-based TCP connection for back-end integration. Additional Dependencies:- WinDbg for Windows x64
- GDB 13 or later for Linux
- LLDB 10 or later for macOS
- Use existing connectors (GDB, dbgeng) as templates
- Look at the Python code in
src/main/pydirectories - Apply the
hasPythonPackage.gradlescript in your module’sbuild.gradle - Follow the testing patterns from GDB (Commands, Methods, Hooks)
Licensing and Copyright
Primary License: Apache License 2.0 Important Guidelines:- Try to stick to the Apache License 2.0 when developing for Ghidra
- Any GPL code must live in the top-level
GPL/directory as a standalone, independently buildable module - Credit/recognition is preferred via Git commit authorship
- Ensure your Git credentials are properly linked to your GitHub account
- Authors’ names directly in source code are discouraged
Building Supporting Data
Some Ghidra features require extensive databases:Data Type Archives
Built manually from the Ghidra GUI:- From the CodeBrowser, select File → Parse C Source
- Create and configure parsing profiles (headers and pre-processor options)
- Click Parse to File to create the Data Type Archive
- Copy the result to
Ghidra/Features/Base/data/typeinfo
FID Databases
Built manually from the Ghidra GUI:- Import the relevant libraries from an SDK
- From CodeBrowser, select File → Configure
- Enable the “Function ID” plugins
- Select Tools → Function ID → Create new empty FidDb
- Choose a destination file
- Select Tools → Function ID → Populate FidDb from programs
- Fill out the options and click OK
Ghidra/Features/FunctionID/data/building_fid.txt.
Next Steps
Now that your development environment is set up:- Review the Contributing Guide to understand the contribution process
- Familiarize yourself with the codebase structure
- Check the Troubleshooting guide if you encounter issues
- Join the GitHub Discussions to connect with the community
