NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Lines starting with # outside php-block handled incorrectly


Joined: 04 May 2009
Posts: 1
Reply with quote
Lines which are started with a hash ('#') outside php-blocks are not handled correctly. As they are not counted as lines during the compilation process the executable lines do not match to the source-code anymore. Thus leading to "breakpoint is set on a non-executable line" errors.

Especially when working with CLI-script this behaviour is very frustrating as all scripts starting with a shebang-line (e.g. #!/usr/bin/php5-cli) cannot nicely be debugged. Because of the breakpoint-line mismatch the script will not halt on correctly set breakpoints.

Any hints how to resolve this issue?
View user's profileFind all posts by ghostjamSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
This issue is a well known issue in php itself.
During long time php is fighting with shebang lines. In some version line numbers are counted well, in some they aren't.
Try to run the following code to check:

Code:
#!/usr/bin/php -q
<?php
  non_existing_function();
?>


and make sure that the error says non_existing_function call is on the 3rd line, not on the 2nd or 4th.
In latter two cases, feel free to submit bug reports at bugs.php.net

As I know php 5.2.8 counts well. 5.2.9 does not.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Lines starting with # outside php-block handled incorrectly
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