Skip to content

Enable / Disable Switch #28

Open
Open

Description

@gabi85ro

Is there any option to disable debugging dynamically, for example to enable for certain requests and disable for others? Something like:

Debugger::disable();
Debugger::enable();

Thank you

Activity

  1. Rich2k commented on Apr 22, 2021

    @Rich2k

    I've just needed a similar functionality, although it's a off for a specific response rather than specific parts of the profiling.

    I've PR'd it, feel free to use or not #30

  2. ErriourMe commented on Jul 15, 2021

    @ErriourMe

    +1

    Im trying to change config via middleware, but it doesnt work(((

  3. bhaidar commented on Mar 8, 2024

    @bhaidar

    @ErriourMe It won't work via a middleware before the package uses the ServiceProvider@boot to check if the package is enabled or not. I am trying too to switch on demand. Did you get any solution over there?

    @Rich2k How can I implement your PR locally? Thank you

  4. Rich2k commented on Mar 8, 2024

    @Rich2k

    You can either fork my branch yourself or include my forked repo directly in your composer file (rather than packagist) https://stackoverflow.com/questions/12954051/use-php-composer-to-clone-git-repo

  5. bhaidar commented on Mar 8, 2024

    @bhaidar

    Thanks @Rich2k!

    I am referencing your repo directly in my composer.json file.

    For the branch, what shall I use? The feature/on-demand-disable-output?

    Thanks

  6. Rich2k commented on Mar 8, 2024

    @Rich2k

    Yep any other branches are just from the upstream

  7. bhaidar commented on Mar 8, 2024

    @bhaidar

    @Rich2k I don't think I am loading the repo correctly.

    Inside the composer.json file, I've added the following:

    "require": {
       "lanin/laravel-api-debugger": "^4.0.0"
    },
    "repositories": [
            {
                "url": "https://github.com/rich2k/laravel-api-debugger.git",
                "type": "git"
            }
        ]
    

    Still, I cannot find the lad_disable_output function.

    I should be referencing the feature branch somewhere but not sure where.

  8. Rich2k commented on Mar 8, 2024

    @Rich2k

    You don't want to use the version tag but the branch name

    Use this

    "rich2k/laravel-api-debugger": "dev-feature/on-demand-disable-output",

  9. bhaidar commented on Mar 8, 2024

    @bhaidar

    Thanks @Rich2k works perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions