NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
debug seems to be jumping over lines


Joined: 24 Mar 2010
Posts: 19
Location: Wheeling, IL
Reply with quote
When stepping through code using f8 the highlight is skipping over lines.

ie:

1 if (strlen($stdatestr) == Cool{
2 $trstmonth = substr($stdatestr, 0,1);
3 $trstyear = substr($stdatestr, 4,4);
4 } elseif (strlen($stdatestr) == 9) {
5 $trstmonth = substr($stdatestr, 0,2);
6 $trstyear = substr($stdatestr, 5,4);
7 }

The cursor will stop on line 2 but on the next f8 it jumps to line 6. Very wierd!

Thanks.
View user's profileFind all posts by bwls@earthlink.netSend private messageSend e-mail
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
Yes, it is weird -- I would have expected the next stop to be at line 3. If debugging a script on a remote server, I suggest you check that the version of the file on the remote server is the same as the local file (maybe the remote file is missing your line 3).

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website
RE: dEBUG MISSING LINES


Joined: 24 Mar 2010
Posts: 19
Location: Wheeling, IL
Reply with quote
I restarted my PC and removed that code. Replaced it with:

$trdate = date('m/d/Y', strtotime($stdatestr));
$trstmonth = substr($trdate, 0,2);
$trstyear = substr($trdate, 6,4);
$trstmonth = $trstmonth * 1; // remove any leading zeros.

and it tracks fine. This is a local system - no remote debugging.

Thanks for the help.
View user's profileFind all posts by bwls@earthlink.netSend private messageSend e-mail


Joined: 11 Apr 2010
Posts: 90
Location: Prague, Czech Republic
Reply with quote
I've experienced this before, but it turned out, that I was debugging unsaved file. It took me almost 10 minutes of total confusion to realized this, because the debug mysteriously ignored lines, jumped somewhere, etc. With unsaved files, this really could happen, because the debugger works with saved version, but you see unsaved version in the IDE. This obviously might result in unexpected behavior. Couldn't this be your problem?
View user's profileFind all posts by fibizaSend private message


Joined: 24 Mar 2010
Posts: 19
Location: Wheeling, IL
Reply with quote
You may be correct. It is ok now and I thank you for your response.
View user's profileFind all posts by bwls@earthlink.netSend private messageSend e-mail
debug seems to be jumping over lines
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