Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I manually call Debugger::getBar()->render() in v2.9? #523

Open
adrianbj opened this issue Dec 27, 2021 · 6 comments
Open

How can I manually call Debugger::getBar()->render() in v2.9? #523

adrianbj opened this issue Dec 27, 2021 · 6 comments

Comments

@adrianbj
Copy link
Contributor

Version: 2.9.0

Hi @dg - this isn't really a bug, but I have relied on:

if(ob_get_level() == 0) ob_start();
Debugger::getBar()->render();
Debugger::$showBar = false;

as per your recommendation here: #214 (comment)

Of course now render() requires the $defer argument.

Any thoughts on how I might be able to handle this need in 2.9?

Thanks.

@adrianbj
Copy link
Contributor Author

Please note that the reason this has come up is because in some server situations, I need to force Tracy to use native PHP sessions: adrianbj/TracyDebugger#66

If I can use the new file-based sessions then the entire workaround isn't needed anymore, which is awesome!

@dg
Copy link
Member

dg commented Jan 10, 2022

Hi. If the problem is that it doesn't use the native session, that should be switched:

Tracy\Debugger::setSessionStorage(new Tracy\NativeSession);
Tracy\Debugger::enable();

Furthermore, I think this Debugger::getBar()->render() could be replaced by this:

Debugger::getStrategy()->renderBar();

@adrianbj
Copy link
Contributor Author

Hi @dg - unfortunately that doesn't help. If you take a look at: adrianbj/TracyDebugger#66 there seems to be a conflict with the new file sessions and @teppokoivula 's setup. So I set an option to use NativeSession, but that conflicts with ProcessWire's SessionHandlerDB (which we discussed here: #214 (comment)) and is the reason why I am using:

Debugger::getBar()->render();
Debugger::$showBar = false;

which works great in Tracy 2.8, 2.7, 2.5 etc, but it no longer works in 2.9 and unfortunately Debugger::getStrategy()->renderBar(); doesn't make the AJAX bar work the way the above fix did for the older versions.

Is there anything else I can provide to help explain my need, or debug? Thanks.

@dg
Copy link
Member

dg commented Jan 11, 2022

Honestly, I'm pretty lost in this :) If you had a repo with a minimal example of the situation, it would help me a lot.

@dg
Copy link
Member

dg commented Feb 3, 2022

@adrianbj Did you manage to resolve it somehow?

@adrianbj
Copy link
Contributor Author

adrianbj commented Feb 3, 2022

@dg - not yet. Sorry for the delay - I'll try to get you access to a setup to test sooner than later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants