NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
set Breakpoint


Joined: 15 Jun 2005
Posts: 46
Reply with quote
When I split my line of code into more line i.e.

$Var =
'A' .
'B';

I have to set the breakpoint at 'B'; to let the debugger stop.........
View user's profileFind all posts by ScubaticusSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
I don't know if this is necessarily a bug, but I would agree with you that this behaviour could be better. I would prefer to be able to set the breakpoint on any of the three lines in your example.

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 15 Jun 2005
Posts: 46
Reply with quote
I also found another BUG when I try to set a breakpoint at a Switch ($n) in:

Switch ($n) {
case 1: break;
case 2: break;
}

The debug show a red line (so I expect it will break when it passes that line), but it's not breaking.
Defining a breakpoint on a case does work.

Scub
View user's profileFind all posts by ScubaticusSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
You should be able to break on an executable line within a case.

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 15 Jun 2005
Posts: 46
Reply with quote
@Anno,

Try to set the breakpoint on the Switch statement .......
View user's profileFind all posts by ScubaticusSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
I did a simple example now, and could indeed break on the case lines (using PHP 5.2.5 on 32bit Vista). The switch line remains unbreakable for me -- I assume PHP considers it a non-executable line.

I have seen some quirks reported on this forum where different versions of PHP on different platforms exhibit different debug behaviour. Dmitri is the person most knowledgeable on this; I am sure he will be able to explain the behaviour. If he does not reply to the thread soon, it will probably be worth your while to submit a support ticket.

In the meantime, what may help you is the following: Set a working breakpoint somewhere in your script, and then start a debugging session. Once the debugging session is in progress, PhpED will show all the executable lines (where you can set breakpoints) with little blue markers in the left gutter. Maybe that will help you find a suitable spot for a working breakpoint.

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
I have to set the breakpoint at 'B'; to let the debugger stop

That's correct. It's the way php works. Don't you see blue dot corresponding to the "b" line?
Quote:
also found another BUG when I try to set a breakpoint at a Switch ($n) in:

Switch ($n) {
case 1: break;
case 2: break;
}

but it's not breaking.

Why do you believe there is a bug? This line is not executable from the php perspectives.

Quote:
The debug show a red line (so I expect it will break when it passes that line),

Wrong assumption. Debugger will break only on the lines marked with blue dots (executable) and only when they are executed. If you believe php incorrectly recognizes the lines to be executed, feel free to post bug report there http://bugs.php.net

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
set Breakpoint
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