NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PHPEd ignores breakpoints following DebugBreak() *solved*


Joined: 03 Mar 2005
Posts: 2
Reply with quote
I use DebugBreak() call to start a debug session in an include file.
I can step over my code with F8 but if I set breakpoints and click F9 after that script just ends ignoring the breakpoints. The same effect with Run To Cursor.
Please advise.
View user's profileFind all posts by otriznaSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Hey sorry for bumping this topic again, but I have the same problem.

I have a project, correctly configured (I can debug it from within the editor sans problemes).
The project is opened and active.

DebugBreak stops and stepping further through the code is not a problem.
There are no mapping errors in the Log, only thing I see is that it reports ID= (but i assume thats normal)
All breakpoints are ignored though. I have no clue what to do to get it working
(I just always assumed breakpoints didn't work when initiating a session via DebugBreak).

Atm I'm using phpEd 4.6.4614 but I it was the same in all versions afaik.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Veteran

Joined: 22 Sep 2005
Posts: 113
Reply with quote
I have the same problem with debugbreak(). The behaviour is the same. I use it mainly when debugging scripts involving AJAX. They are called by the browser and I intercept the call to check parameters and step through the code. But the debugger ignores all breakpoints I set. The only work around I found is to place many debugbreak calls in the code if it's long.
View user's profileFind all posts by HoTShoTSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
after all, I was able to replicate that Smile
Please enable JIT by setting debugger.JIT_enabled=On in php.ini and it will work like a charm.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
If you didn't live so far I would come over and kiss you! Wink
Thanks, that seems to have solved it!
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Veteran

Joined: 22 Sep 2005
Posts: 113
Reply with quote
ddmitrie wrote:
after all, I was able to replicate that Smile
Please enable JIT by setting debugger.JIT_enabled=On in php.ini and it will work like a charm.

Yes. It's working fine now. Just for curiosity, what "JIT" stands for? And why debugbreak is never mentioned in phpED help file?
View user's profileFind all posts by HoTShoTSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
HoTShoT wrote:
Just for curiosity, what "JIT" stands for?

JIT stands for Just In Time and is normally used to state that something is done at the moment it is needed,
like JIT compiling etc... I presume it has something to do with assembling the list of breakpoints during the debugging instead of at the start...

Anyway I'm glad it works, helps out a lot.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
JIT means that debugger should start capturing all necessary info from the beginning so it will be able to start debug session just in time when error happens.

I agree, there is no relation to the problem, it's just a workaround to get breakpoints working in this case.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 22 Sep 2005
Posts: 113
Reply with quote
And why debugbreak is never mentioned in phpED help file? Does it accept parameters? Are there other "magic" undocumented functions like this? Smile
View user's profileFind all posts by HoTShoTSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
Yes it accepts just one argument - a string with the same syntax as in DBGSESSID.
Regarding documentation, there are some gaps up to now. But in this particular case, I don't believe that DebugBreak is too widely used Smile and that there are cases when you can't live without it Smile. Why not to use regular "Run In Debugger" and use breakpoints that are set in the IDE?
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 22 Sep 2005
Posts: 113
Reply with quote
ddmitrie wrote:
...Why not to use regular "Run In Debugger" and use breakpoints that are set in the IDE?

I prefer debugbreak just because running in debugger makes it too much slower in those situations I know exactly where I want to debug. For example: I have a script, plenty of forms, with many input consistency checks and want to debug just when the user has passed all the checks and the script will finally save the data in database. And there are the ajax cases, where I debug only with debugbreak.

About debugbreak, is it possible to set a condition as a parameter? If I put it inside a "for($i=..." loop and want that it come in action on the 100th cycle, I would just set debugbreak($i==100)
View user's profileFind all posts by HoTShoTSend private message
PHPEd ignores breakpoints following DebugBreak() *solved*
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