NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] </script> skews line numbers


Joined: 25 Jul 2006
Posts: 28
Location: Germany
Reply with quote
Hi Dmitri,

the editor shows all "debuggable" lines (those with the "blue dot" in the gutter) one line too far/below, i.e. before a valid line was at e.g. 100, now it the blue dot shows at 101 - which could be blank; this is for all lines and makes debugging pretty distracting. Shocked

Hopefully you can fix this soon, thank you.

Other issues/requests:
a) if a <!php ... ?> block is inside regular html, you can only set a breakpoint by hotkey F5 if the cursor is inside that code, but not by clicking on the line number
b) double-click on folder names in the Code Explorer does not expand/collapse the branch, click on +/- is required
c) I'm desperately missing context menu items "Expand All" and "Collapse All" in the Code Explorer and Navigator

Regards,
Tobias
View user's profileFind all posts by condev1972Send private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
the editor shows all "debuggable" lines (those with the "blue dot" in the gutter) one line too far/below, i.e. before a valid line was at e.g. 100, now it the blue dot shows at 101

it looks like a well-known bug in php itself. Sometimes it can't count the lines properly.
It may happen if
a) you have #!/usr/bin/php or something like this in the first line
b) your file uses Mac-style line endings (at least for some of the lines)
c) there is at least one HEREDOC in your file
d) there is </script> in your code

Debugger has nothing to do with this as it's php count line numbers.

To make sure that you faced up with php problem, just create an error (echo uninitialized variable) in your script and compare line number (in E_NOTICE) with actual one.
You may want to submit this bug to http://bugs.php.net/

BTW, what php version do you use? I did not see this bug for very long time, ~ 2years. At least I don't see it in php 4.4.2+ and 5.2.1+.

Quote:
double-click on folder names in the Code Explorer does not expand/collapse

double-click is not supposed to expand/collapse the nodes in the tree. Please click on [+] and [-] marks or press + and - keys in the keyboard.
Quote:
I'm desperately missing context menu items "Expand All" and "Collapse All"

You may want to use / and * keys.


Last edited by dmitri on Sat Feb 09, 2008 11:42 am; edited 1 time in total

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


Joined: 25 Jul 2006
Posts: 28
Location: Germany
Reply with quote
Hello Dmitri,

thanks for your help! I couldn't think of any of the first suggestions to check you gave (a - c), so I wasn't sure where to look at.
Finally, I went through that particular file again and found several occurences where there was code lines like this:
Code:

<?php 
...
?>
<script ...>
 ... some JavaScript 
</script>
<?php
...

Eventually, after editing some of these lines by e.g. removing extra linebreaks to have

</script><?php ...

on a single line, the "blue dots" in the editor came back correctly for that file.
This is the first time I became aware of the possibility that PHP may act up on line numbers. Smile Always something to learn and then some...

So.... in short, not a problem at all with phpEd (which I couldn't believe anyway Smile ), please mark this thread as "fixed".

Thanks again for your time and hints!!

Have a nice weekend,
Tobias
View user's profileFind all posts by condev1972Send private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
this is not a problem with PhpED but with php as I originally told you.
Please submit your code sample
Code:
<?php 
...
?>
<script ...>
 ... some JavaScript 
</script>
<?php
  echo $uninitialised_variable

to http://bugs.php.net/
and tell them that php reports wrong line in the E_NOTICE error for the uninitialized variable

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[resolved] </script> skews line numbers
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