{"id":21406457,"url":"https://github.com/arturoeanton/gofuji","last_synced_at":"2026-05-20T15:02:23.552Z","repository":{"id":261692227,"uuid":"884454871","full_name":"arturoeanton/gofuji","owner":"arturoeanton","description":"A web-based Go debugger using Fiber, Delve, and the Debug Adapter Protocol (DAP). Provides an interactive UI for setting breakpoints, inspecting variables, evaluating expressions, and controlling execution in real time.","archived":false,"fork":false,"pushed_at":"2024-11-07T22:20:30.000Z","size":295,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T04:11:10.381Z","etag":null,"topics":["breakpoint","breakpoints","console-evaluator","dap","debug-adapter-protocol","debugger","debugging-tool","delve","developer-tools","fiber","go","go-application-debugger","golang","ide","interactive-debugging","real-time-debugging","variable-inspector","web-based-debugger","websocket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/arturoeanton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2024-11-06T19:29:25.000Z","updated_at":"2024-11-07T22:20:33.000Z","dependencies_parsed_at":"2024-11-07T23:17:28.668Z","dependency_job_id":"3e2fdbb4-2568-4476-9380-b66d68ee2af8","html_url":"https://github.com/arturoeanton/gofuji","commit_stats":null,"previous_names":["arturoeanton/gofuji"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturoeanton%2Fgofuji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturoeanton%2Fgofuji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturoeanton%2Fgofuji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturoeanton%2Fgofuji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arturoeanton","download_url":"https://codeload.github.com/arturoeanton/gofuji/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902320,"owners_count":20366262,"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":["breakpoint","breakpoints","console-evaluator","dap","debug-adapter-protocol","debugger","debugging-tool","delve","developer-tools","fiber","go","go-application-debugger","golang","ide","interactive-debugging","real-time-debugging","variable-inspector","web-based-debugger","websocket"],"created_at":"2024-11-22T16:40:00.373Z","updated_at":"2026-05-20T15:02:18.489Z","avatar_url":"https://github.com/arturoeanton.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoFuji DAP Debugger Client with Go and Fiber\n\nWelcome to the **DAP Debugger Client** project! This is a web-based application for debugging Go applications using the Debug Adapter Protocol (DAP) and Delve. Built with the **Fiber** web framework and using **WebSockets**, it provides an interactive, user-friendly GUI to help developers debug their applications with ease.\n\n## Overview\n\nThis project aims to give developers a streamlined debugging experience through a web interface that lets you connect to a Delve DAP server, control the execution flow, set breakpoints, and inspect code and variables in real-time.\n\n**Features:**\n\n- **Live Debugging Interface**: Control program execution with commands like Continue, Pause, Step In, Step Over, and Step Out.\n- **Breakpoint Management**: Set, remove, and view breakpoints by line or function name.\n- **Code View**: Display source code with proper formatting, including preserved tabs and line numbers.\n- **Variable Inspection**: Easily inspect variables within the current scope, including nested values.\n- **Execution Timing**: Track time intervals between breakpoints to analyze performance.\n- **Interactive Console**: Evaluate expressions within the current context and scope.\n\n## Demo\n\n\u003c!-- Include a screenshot or GIF demonstrating the UI here --\u003e\n![DAP Debugger Client Demo](https://github.com/arturoeanton/gofuji/blob/main/demo.png?raw=true)\n![Breakpoint Demo](https://github.com/arturoeanton/gofuji/blob/main/demo1.png?raw=true)\n![Debugger Demo](https://github.com/arturoeanton/gofuji/blob/main/demo2.png?raw=true)\n## Getting Started\n\nTo get this application running on your machine, follow these instructions.\n\n### Prerequisites\n\n- **Go** (version 1.16 or higher)\n- **Delve** (Go debugger with DAP support)\n- **Fiber** (version 2.0 or higher)\n- **Node.js** and **npm** (optional, for managing frontend dependencies if you want to customize the UI; however, dependencies are loaded via CDN)\n\n### Installation\n\n1. **Clone the Repository**\n\n    ```bash\n    git clone https://github.com/arturoeanton/gofuji.git\n    cd gofuji\n    ```\n\n2. **Install Go Dependencies**\n\n    Make sure to install the dependencies required for the Fiber framework:\n\n    ```bash\n    go mod tidy\n    ```\n\n3. **Run Delve with DAP Support**\n\n    Start your Go application using Delve in DAP mode. For example:\n\n    ```bash\n    dlv dap --listen=:12345 --api-version=2 --headless --log --log-output=dap,rpc ./path/to/your/main.go\n    ```\n\n    \u003e **Note**: Replace `./path/to/your/main.go` with the path to your Go application.\n\n4. **Run the Fiber Server**\n\n    Start the Fiber server to serve the debugging client UI:\n\n    ```bash\n    go run main.go\n    ```\n\n5. **Access the Debugging UI**\n\n    Open your browser and navigate to `http://localhost:3000` to access the DAP Debugger Client UI.\n\n---\n\n## Usage\n\n### Connecting to a Delve DAP Server\n\n1. **Enter Connection Details**:\n    - **Address**: IP address of the Delve server (default: `127.0.0.1`)\n    - **Port**: Port of the Delve server (default: `12345`)\n    - **Program Path**: Path to the Go application to be debugged\n\n2. **Click \"Connect\"**:\n    - Once connected, you will see controls and options to manage breakpoints, inspect variables, and view code execution.\n\n### Debugging Features\n\n#### 1. **Execution Control**\n    - Continue, Pause, Step In, Step Over, Step Out with dedicated controls.\n\n#### 2. **Breakpoint Management**\n    - Open the **Breakpoint Manager** to add breakpoints by:\n        - **Line Number**: Set breakpoints at specific line numbers.\n        - **Function Name**: Set breakpoints at the start of specific functions.\n    - View all active breakpoints and delete them if necessary.\n    - Track time elapsed between breakpoints.\n\n#### 3. **Code View and Variable Inspection**\n    - View the source code and highlight the current execution point.\n    - Inspect variables and scope in real-time as the code executes.\n\n#### 4. **Interactive Console**\n    - Enter Go expressions in the console to evaluate in the current context and display the results immediately.\n\n---\n\n## Project Structure\n\n```plaintext\n├── main.go         # Main Go server file using Fiber\n├── static/\n│   ├── index2.html # Main HTML file for the client UI\n│   ├── app2.js     # Main JavaScript file for client functionality\n│   ├── styles.css  # Custom styles for the UI\n└── README.md       # Project documentation\n```\n\n---\n\n## Key Files and Components\n\n### main.go\n\nThe server-side code for the Fiber application, which:\n- Hosts a WebSocket endpoint for DAP communication.\n- Provides an endpoint for fetching Go file information (e.g., functions and line numbers) for setting breakpoints.\n\n### index2.html\n\nThe main HTML file that structures the layout of the DAP Debugger Client UI, including:\n- **Execution Controls**\n- **Breakpoint Manager** (in a modal for ease of use)\n- **Console Output** and **Variable Viewer**\n\n### app2.js\n\nJavaScript functionality for the frontend, including:\n- Handling WebSocket communication with the Fiber backend.\n- Managing breakpoints, execution controls, and console evaluations.\n\n---\n\n## API Endpoints\n\n### `/ws`\n**WebSocket Endpoint**: Manages communication with the Delve debugger using the DAP.\n\n### `/functions?filePath=path/to/file`\n**Function Endpoint**: Provides a JSON list of functions and their line numbers for a specified Go source file, allowing breakpoints to be set by function name.\n\n---\n\n## Example Workflow\n\n1. **Connect** to the debugger by providing the address, port, and program path.\n2. **Set Breakpoints** by line number or function name.\n3. **Control Execution** using the provided buttons (continue, pause, step).\n4. **Inspect Variables** in the current scope as you step through the code.\n5. **Evaluate Expressions** in the console for on-the-fly inspection and debugging.\n\n---\n\n## Technical Details\n\nThis project uses:\n- **Go** for server-side logic and debugging protocols.\n- **Fiber** as the web server for efficient, minimalistic API handling.\n- **WebSockets** for real-time updates between client and server.\n- **Bootstrap and Font Awesome** for UI styling.\n- **Vanilla JavaScript** to manage the frontend interactions, including breakpoints and console evaluations.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues, feature requests, or pull requests.\n\n---\n\n## Future Enhancements\n\n- **Persistent Breakpoints**: Save and load breakpoints across sessions.\n- **Advanced Variable Inspection**: Support for complex types and nested data structures.\n- **Enhanced Console Functionality**: Auto-complete, syntax highlighting, and additional context options.\n\n---\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## Acknowledgments\n\n- **Fiber**: For creating a powerful, minimalistic web framework for Go.\n- **Delve**: For providing a robust debugging tool for Go developers.\n- **DAP**: For defining a unified protocol for debuggers across languages and platforms.\n\n---\n\nHappy debugging! \n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturoeanton%2Fgofuji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farturoeanton%2Fgofuji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturoeanton%2Fgofuji/lists"}