NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debug without saving


Joined: 14 Jun 2009
Posts: 13
Reply with quote
One feature that is important to me is being able to write a quick little php script and execute it inside the IDE. I haven't been able to figure out how to do this with in PHP IDE. It seems that it requires the file to be saved before hand.

This is inconvenient for me because I do test scripts to make sure that some code I've never used before will work as expected. Think of it as a sort of inline unit test.

I also use that sort of thing for other reasons, like processing text. Suppose you have a long list of names in an html table. PHP can parse out those names and var_export can create an array for you. I do that with enough frequency that being forced to save a file just so I can test it would be an inconvenience.
View user's profileFind all posts by FloydianSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Since all execution is done by the PHP Interpreter and not the IDE this is is not really an option The file needs to be saved to disk for the PHP parser to be able to read your last code changes.
I'm afraid that unless the IDE itself would incorporate a version of PHP that is technically impossible.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Hmm, technically it's possible. Even more, one known IDE follows this approach.
Regardless of the user choise, it runs dummy.php. When the debugger starts, the IDE sends real content and tells the debugger to "override" the file content with what user started the debugger.
Personally, I see only one benefit: you don't have to save the file on disk to start it in the debugger.
On the other hand, if you have 30-40 files and all are actively develped and include or depend on each other, the IDE has to transfer them to the debugger each time you start the debugger. Even one file slows down the debugger startup. Plus, it's really hard to replace "dummy.php" with real user file. The bunny ears are visible there and here (in many places). Regardless how carefully the debugger "overrides" the file content, dummy still can be found. In other words, this approach is not clean and may affect the debugging results.

Finally, you want to debug your file, why would IDE run something else? If saving the file is just an additional step that takes your time, there is a simple solution. To make your life easier, we implemented "auto save". You may want to check this option and PhpED will save the files each time you press "Run" or "Run with debugger". In case of remote files (sftp/ftp/dav), you may want to check "auto upload" and IDE will upload the files before running them.

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


Joined: 14 Jun 2009
Posts: 13
Reply with quote
Thanks for the replies Blizz and dmitri.
I'll post a feature request for a "quick execute" feature. It's main use would be to just execute a php script without any debugging. It should show output in either text or html format, and not require files to be saved.
Cheers Wink
View user's profileFind all posts by FloydianSend private message


Joined: 17 Jul 2009
Posts: 3
Reply with quote
Hey Dimitri tht was a lot helpful man........thnx
Regards
View user's profileFind all posts by mayu0203Send private message
Debug without saving
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