PHPackages                             softgala/laravel-claude-button - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. softgala/laravel-claude-button

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

softgala/laravel-claude-button
==============================

Adds an error copy button to Laravel 500 pages. Clipboard + VS Code integration for AI-assisted debugging.

v1.1.0(7mo ago)08MIT-0BladePHP ^8.1|^8.2|^8.3

Since Oct 11Pushed 7mo agoCompare

[ Source](https://github.com/EcMarius/laravel-ai-debug-copy)[ Packagist](https://packagist.org/packages/softgala/laravel-claude-button)[ Docs](https://github.com/EcMarius/laravel-ai-debug-copy)[ RSS](/packages/softgala-laravel-claude-button/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Laravel AI Debug Button
=======================

[](#laravel-ai-debug-button)

[![Latest Version on Packagist](https://camo.githubusercontent.com/112d54fbd3d8f4acfd14e45c8ef7d4180fa9a4d5f5d9a9826e1ed4f378c03cc0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f667467616c612f6c61726176656c2d61692d64656275672d636f70792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/softgala/laravel-ai-debug-copy)[![License](https://camo.githubusercontent.com/df4118308f16a7321b38dce9dc32cfb098f6e6b5d8a2d66f9d8503159d2ea554/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d2d302d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE)

A Laravel package that adds a one-click button to your error pages. Instantly copy error details to your clipboard and optionally open the file in VS Code. Perfect for AI-assisted debugging with ChatGPT, Claude, Copilot, or any AI assistant.

[![Laravel AI Debug Copy Demo](docs/images/screenshot.png)](docs/images/screenshot.png)

Features
--------

[](#features)

- 🚀 **One-Click Error Copying**: Instantly copy error details to clipboard - ready to paste into any AI chat
- 📋 **Smart Clipboard**: Works in HTTP contexts without HTTPS (perfect for local development)
- 🔗 **Optional VS Code Integration**: Toggle to automatically open error file in VS Code
- 💾 **File Export**: Saves error details to `storage/app/claude-errors/latest-error.md` for easy reference
- 🎨 **Clean UI**: Beautiful, non-intrusive button that appears only on errors
- 🎛️ **Settings Card**: Toggle VS Code auto-open on/off (preference saved in browser)
- 🔒 **Environment-Safe**: Only shows in local/development environments
- 🤖 **AI-Ready Format**: Clean error message + file location - perfect for any AI assistant
- ⚙️ **Zero Config**: Works immediately after installation

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require softgala/laravel-ai-debug-copy
```

The package will automatically register its service provider.

Configuration
-------------

[](#configuration)

Publish the configuration file (optional):

```
php artisan vendor:publish --tag=claude-button-config
```

This will create a `config/claude-button.php` file where you can customize:

```
return [
    // Enable or disable the button
    'enabled' => env('AI_DEBUG_BUTTON_ENABLED', true),

    // Only show in these environments
    'environments' => ['local', 'development'],

    // Stack trace depth (0 = cleanest, just error + location)
    // Set to 3+ to include stack trace for deeper debugging
    'trace_depth' => 0,
];
```

**Note on `trace_depth`:**

- `0` (default): Shows only error message and file location - cleanest format for AI
- `3+`: Includes stack trace frames for additional context

Usage
-----

[](#usage)

Once installed, the package will automatically add a "Copy Error for AI" button to any 500 error pages in your allowed environments.

### Testing

[](#testing)

Visit the test route to see it in action:

```
http://your-app.test/error/test

```

### How it Works

[](#how-it-works)

1. When an error occurs, a settings card and button appear in the **bottom-right corner**
2. **Settings Card**: Toggle "Open VS Code" on/off (preference saved in browser)
3. Click the button to:
    - Copy error details to clipboard (works in HTTP and HTTPS)
    - Save error report to `storage/app/claude-errors/latest-error.md`
    - Open VS Code at the exact line where the error occurred (if enabled)
4. **Paste into your AI assistant**:
    - Open ChatGPT, Claude, Copilot, or any AI chat
    - Paste (Cmd+V / Ctrl+V) - error details already in clipboard
    - Or open `storage/app/claude-errors/latest-error.md` and share the file
5. Get instant AI-assisted debugging and solutions!

What Gets Copied
----------------

[](#what-gets-copied)

The button formats error information cleanly and concisely:

```
Test error message here

/path/to/file.php:123

```

That's it! Just the error message and file location. This clean format works perfectly with any AI assistant:

- ChatGPT, Claude, Copilot, or any AI tool
- Paste and get instant analysis
- AI understands the file path and line number
- No verbose formatting - straight to the point

Security
--------

[](#security)

- The button only appears in local/development environments
- No data is sent to external servers
- All processing happens client-side
- VS Code opens via local `vscode://` protocol

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Laravel 10.x, 11.x, or 12.x
- VS Code (optional, for auto-opening error files)

Publishing Views
----------------

[](#publishing-views)

To customize the button appearance, publish the views:

```
php artisan vendor:publish --tag=claude-button-views
```

This will create `resources/views/vendor/claude-button/button.blade.php`.

Error Files
-----------

[](#error-files)

The package automatically saves error details to:

- `storage/app/claude-errors/latest-error.md` - Always contains the most recent error
- `storage/app/claude-errors/latest-error-YYYY-MM-DD-HHMMSS.md` - Timestamped backups

Old error files are automatically cleaned (keeps last 10).

**Example error file:**

```
Test error for AI debug button - This is a demo error!

/path/to/file.php:123

---

*Error captured at: 2025-10-12 14:30:45*
*Type: Exception*
```

These markdown files can be:

- Opened directly in VS Code
- Shared with any AI assistant via file upload or copy/paste
- Committed to your repo for team debugging
- Used for error documentation

Tips for Best Results
---------------------

[](#tips-for-best-results)

1. **With Any AI Assistant:**

    - Click button, paste error into ChatGPT/Claude/Copilot/etc
    - Error is already formatted and ready to go
    - Get instant analysis and solutions
2. **VS Code Toggle:**

    - Toggle "Open VS Code" OFF if you prefer clipboard only
    - Your preference is saved in browser localStorage
    - Perfect for quick copy without opening editor
3. **Non-HTTPS Development:**

    - Works perfectly on `http://localhost` or any HTTP context
    - Smart clipboard fallback ensures it always works
    - No SSL certificate required
4. **Team Debugging:**

    - Share the `latest-error.md` file with teammates
    - Everyone can paste the same error into their preferred AI tool
    - Consistent error format across team

Contributing
------------

[](#contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

Security
--------

[](#security-1)

If you discover any security-related issues, please email  instead of using the issue tracker.

Changelog
---------

[](#changelog)

Please see [CHANGELOG.md](CHANGELOG.md) for recent changes.

License
-------

[](#license)

MIT-0 (MIT No Attribution). Use it however you want, no attribution required. Please see [LICENSE](LICENSE) for more information.

Credits
-------

[](#credits)

- [SoftGala](https://softgala.com)
- [All Contributors](../../contributors)

Support
-------

[](#support)

- **Issues**: [GitHub Issues](https://github.com/EcMarius/laravel-ai-debug-copy/issues)
- **Email**:
- **Website**: [softgala.com](https://softgala.com)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance65

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

212d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/243b13b601afc2715cb3c073d3ec27abe506ce413c714a65edfb7de4df9e2ae2?d=identicon)[EcMarius](/maintainers/EcMarius)

---

Top Contributors

[![mariusburk](https://avatars.githubusercontent.com/u/39024851?v=4)](https://github.com/mariusburk "mariusburk (5 commits)")

---

Tags

laravelaidebugginglaravel-packageerror handlingcopilotclaudeChatGptdeveloper-toolsvscode

### Embed Badge

![Health badge](/badges/softgala-laravel-claude-button/health.svg)

```
[![Health](https://phpackages.com/badges/softgala-laravel-claude-button/health.svg)](https://phpackages.com/packages/softgala-laravel-claude-button)
```

###  Alternatives

[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[claude-php/claude-php-sdk-laravel

Laravel integration for the Claude PHP SDK - Anthropic Claude API

5010.8k](/packages/claude-php-claude-php-sdk-laravel)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
