NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
*resolved* Cannot get Profiler to Run


Joined: 02 Dec 2013
Posts: 10
Reply with quote
OK, this is not a new problem. I have never been able to get the profiler to run since version 8

Whenever I try to run a Profiler session I get the message "Script [myscript] has finished but no profiler data collected".

Nothing I do ever seems to collect profiler data. What am I doing wrong ?

Version : 13.0 Build 13031, But has never worked on any version of PhPEd
OS : Win 7 64 bit
Webserver : IIS7
Profiler is enabled in php.ini with "debugger.profiler_enabled=on" and phpinfo shows that the profile is enabled.
View user's profileFind all posts by robdlyonSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
When you start a page with the profiler enabled, what does the URL show? (the bit with the DBGSESSID.....)
View user's profileFind all posts by plugnplaySend private message


Joined: 02 Dec 2013
Posts: 10
Reply with quote
I'm trying to run the profiler from inside PhPEd on a local webserver using Alt-F9, doesnt this handle the URL without me having to do anything ?

Anyway, I also tried in FF using http://localhost/ocd/index.php?DBGSESSID=1;d=1,p=0

so that should also invoke the debugger ?
View user's profileFind all posts by robdlyonSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
Your parameters for DBGSESSID are not turning on the profiler; p=0 means no profiler.

Manually changing p=0 to p=1 will be enough to kick the line profiler into action (1=line profiler, 16=SQL profiler, 17=both)

In theory having the debugger off (d=0) might be a good idea because certain debug actions such as breakpoints might interfere with the profiler results.

Alt+F9 on my PhpED does give me d=0,p=17 to turn off debugger and run profiler. In your IDE Shortcuts, is Alt+F9 assigned to Run Profiler?

Note: In the debugger settings there is a tick box to always run the profile with debugger and that would automatically apply this parameter for you. If you forget about that, you might find debugging in the future is slower. I once forgot and couldn't understand why debugging was now taking so long! In theory you should not need to tick that.

By using DBGSESSID you can also start the profiler on demand just for certain actions, such as the next page request, or submitting a form (add it to the post action), just Ajax calls, etc.

Also have a look at http://www.nusphere.com/kb/technicalfaq/faq_dbg_related.htm
View user's profileFind all posts by plugnplaySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
robdlyon,
seems you do something wrong, b'ze if you invoked profiler inside the IDE, it would set p=1. If you see p=0, it's either not profiler your click or it's not IDE you work with.
Make sure that Line Profiler is checked in the Profiler button dropdown. Then proceed with profiling of something simple.
If you experience a problem, please contact support.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 02 Dec 2013
Posts: 10
Reply with quote
Thanks Dmitry.

I'm aware that there are multiple ways to get the profiler to run including : Alt-F9, Run-> Run In Profiler, Tools -> Open Url and manually adding ?DBGSESSID=1;p=1 (or 16 or 17) to a browser wndow. I have tried using the Embedded Browsers for Chrome, Mozilla and IE as well as external IE and FF browsers. Yes, I have the options "Line Profiler" and "SQL Profiler" Ticked ( and have of course tried all 4 possible combinations :p )

Using an external browser gives a command like
http://localhost/ocd/index.php?DBGSESSID=417593613652300014;d=0,p=17,c=1

My log shows that a profile session started
... Debugger Starting profile session (417593613652300014), script: /ocd/index.php, server: localhost, sapi: cgi-fcgi 8:34:55 p.m.
... Debugger Debug session finished 8:34:56 p.m.

Followed by a popup window that says no data was collected. I believe the messages show the profiler is running, but is simply not collecting data.
View user's profileFind all posts by robdlyonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
1. Are you trying to profile scripts that are available in aource form (vs pre-compiled or pre-encoded ones)?
2. Do you have any php cache or accelerator installed? Such things like APC, PhpExpress should be disabled before profiling scripts.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 02 Dec 2013
Posts: 10
Reply with quote
Hi Dmitry ...

1. Sorry, misread this question. The files I am trying to profile are all PhP source files
2. No. I'm not using an accelerator
View user's profileFind all posts by robdlyonSend private message


Joined: 02 Dec 2013
Posts: 10
Reply with quote
Seems to have been fixed in V14
View user's profileFind all posts by robdlyonSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
I had a problem with the profiler a couple of weeks ago with v14. It turns out that I hadn't updated the debugger module, so PhpED was getting the wrong profile data. Maybe previously you also had a version mismatch and that is now correct with v14 and installing latest debugger module?
View user's profileFind all posts by plugnplaySend private message


Joined: 02 Dec 2013
Posts: 10
Reply with quote
I'm not so sure. The Nusphere support team have been pretty helpful trying to get to the root of the problem. We checked the debugger version several times and did a bunch of minor version upgrades. I notice with V14 there's a new memory profiler so there has been some work done in the profiler module. I think it is just as likely that something sorted my problem as a side effect of other code changes or tidy ups.

Anyway, it's working now and already makes my life easier Cool
View user's profileFind all posts by robdlyonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Indeed, there was a problem in v13 and it didn't poll for profiler data _if_ no workspace was created. It's what was fixed in v14.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
*resolved* Cannot get Profiler to Run
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic