I've read a lot of xdebug / WAMP / NetBeans won't connect messages, but so far they haven't helped.
I've got a php test project that connects to netbeans-xdebug, and lets me break, step, watch variables, and other good stuff.
I did that to test the environment. The local site I want to develop with is an ActionScript 3.0 site with php handlers. I was hoping I could simply point to the src directory, set my URL to http://localhost/TestInterface.swf, and then hit breakpoints as I did earlier. Unfortunately I'm seeing a seemingly unending "Waiting for Connection (netbeans-xdebug)" message at the bottom of the NetBeans IDE and no breakpoints.
When using IE11, the flash app continues to work while "Waiting for Connection", and no breakpoints are hit. My php test project hits breakpoints.
When using Chrome with the NetBeans connector, same thing for both.
My php code is running directly, the URL ends with test.php. My flash code is running flash, and using POST to execute the php scripts. I feel like I'm not directly connecting to the code as far as xdebug is concerned, but I'm still too new to this architecture to know for sure if that's the case, and if so what to do about it.
If anyone has any insights they could share, I'd appreciate it. When I include flash or actionscript in my search for this, it comes up empty.
Thanks.
I suppose something is mysteriously wrong with my system. However, I stopped using IE and Chrome and switched to Firefox, and it's all working as expected.
Related
I am using Aptana 3 studio to work on my php (drupal) projects. All of the sudden, the debug function stopped working. It used to work flawlessly. Now when I select a debug configurtion and debug it, an empty page opens in firefox.
Is this connected with how Aptana communicates with the browser? With the server?...
EDIT:
So I decided to try a new thing altogether and installed a full new system based on LXLE 14.04 (based on the same ubuntu 14.04, which I used in a full unity version before).
Now, after some quirks, I have a running debug in Aptana on that system. I am pretty sure, though, that this is the configuration that worked for me in the first place.
I also remarked some weird window behavior on the system - sometimes the Aptana window would get so small it is hardly noticable (1px*1px?) and gets to the top left corner.
I found that setting xdebug.remote_autostart=1 in php.ini and restarting Apache allows me to debug somewhat. Although Firefox still opens a blank page, opening the page myself in the browser now allows me to get a break in Aptana.
I'm trying to update a site that's using php. I built the site and tested it on this machine. But today, the Php won't run on my local machine.
To test, I went back to the most basic php page I have:
<?php
phpinfo();
?>
When I navigate to this file, in Firefox (28), the result is a blank page. (The page source shows just my code.) In IE 11, I'm asking whether I want to open or save the file.
Searching for my original problem (which was that my php code was showing up rather than running), it was suggested that php wasn't installed. I don't know how it would have gotten uninstalled, but I went ahead and installed it again (from http://www.microsoft.com/web/platform/phponwindows.aspx) and still no joy.
Windows 7 SP1
Updates in response to suggestions:
Pardon the beginning stuff, but I'm not primarily a web developer. (I do databases.) This is stuff I'm doing for an organization I'm involved in. I don't actually remember having installed/configured a web server in the first place, nor do I remember having installed php before yesterday (though maybe my son did that for me).
After seeing the replies here, I followed the instructions on this page: http://webmasterjuice.com/how-to-activate-built-in-web-server-windows, but I'm still seeing the same thing.
Update:
I've confirmed that IIS is running and the php was installed. I've followed instructions I found online for getting php working in Windows 7 with IIS. However, it still doesn't make sense to me to have to do this. I'm sure I didn't do any of this when I started working with php. I'm not trying to use my computer as a web server. No interest in working through localhost.
I'm creating the file in a simple web-oriented editor (Crimson Editor). Until recently, I could use the editor's preview function on a file, whether HTML or PHP, and it would run correctly. I'm baffled as to why this stopped working.
A few things to look for:
It's php running besides been installed? (obvious, but maybe it got killed by some reason)
Have you included the phpinfo() call inside a html document?
Obviously you named the file with a .php extension and saved it within the document root of the server..?
I have an application I'm working on in which I make many AJAX calls to external PHP files. These PHP files get certain parameters, connect to the DB, and perform a task with them.
I just recently started using Netbeans for an IDE and love it thus far. However, whenever I put a breakpoint on one of my external PHP files (the ones I'm making AJAX requests to) and attempt to run the debugger, my breakpoints are never hit. Am I doing something wrong? Or does the Netbeans debugger not stop on the breakpoints of external files you are referencing?
NetBeans need to be configured to use xdebug, before you can strt debugging. For instructions on installing and configuring xdebug see here: http://wiki.netbeans.org/HowToConfigureXDebug
Here is a nice step-by-step tutorial for setting this up. A little less wordy than the netbeans documentation:
http://arturito.net/2011/05/21/local-and-remote-php-debuging-in-netbeans-with-xdebug-on-google-chrome-just-like-in-visual-studio/
I've been using notepad++ for web development (currently html, css, and some php and mysql). I decided to dive into an IDE to see if I could cut down on development time and have more power than notepad++.
I grabbed Aptana yesterday and, after harassing it for a few hours, have finally gotten everything up and running. The only problem is that my web pages, which are .php's, do not execute any of their included php code in the browser.
as an example:
<?php
echo "IT WORKS WOOO";
?>
ought to print IT WORKS WOOO smack in the middle of my blank test page, and yet it does not. I checked to see if I had somehow forgotten how to do an echo statement and ran it on my desktop, using notepad++, and it worked just fine.
I have the php plugin, have used the php perspective to write it and have launched it as a php web page, but nothing makes it execute the php within.
Any ideas?
-Sqm
From the sounds of it your using plug-ins to parse php files, which Aptana doesn't. You will need to install a php stack to test your scripts properly.
Try Zend Server community edition, which a full lamp stack.
I'm having trouble with debugging a PHP project through NetBeans using XDebug, and was hoping someone out there might have had this problem before.
Debugging works fine for the requested php file - so if I go to index.php on the remote server, I can put a breakpoint anywhere in index.php in NetBeans and the code stops there and I can step through.
The trouble is, all the other files appear on the call stack like this: "file:///home/user/site_html/library/class.requestprocessor.php" and because that's a path to a file on the remote server, NetBeans is unable to resolve the name, and so I can't step through the code for it. It makes debugging practically useless! The php file that was requested, for example index.php, appears just as "index.php", it's just all the other ones which are included that NetBeans can't resolve properly.
Is there some setting in NetBeans or XDebug that I can use to solve this problem? I have tried my best looking through all the project settings and options in NetBeans, and also looked through all the configuration options of the XDebug extention, but to no avail. Surely someone out there must have had this problem before? How did you solve it? I'll be very grateful if you could let me know.
If there's no other way, do users of Eclipse PDT and XDebug have this problem when debugging on a remote server? If not I'll make the switch.
This issue appears to be fixed in NetBeans 6.7.
Okay it seems no one is going to answer the question, so I'll post the results of my research.
As I was unable to find a way to make NetBeans successfully debug as I wanted, I tried using Eclipse PDT and Visual Studio 2008 with the VS.php extension in order to solve my problem. Eclipse PDT was hell to setup, and I wasn't happy with the way you couldn't specify a port to use for your FTP server in its Remote Server Explorer. I found VS.php did everything I wanted, it automatically uploads the code, as well as having perfect debugging, and it was EASY to setup. The only thing is, it looks ugly and I can't find a way to customise its colours. However, I'm going to choose function over fashion, and so I've settled on using VS.php as my final solution. Which to be honest is a shame, NetBeans was really great, I just can't live without a working debugger.
I had this same issue. I'm running Netbeans 6.8. You have to right click on your project, go to project properties/run configuration/advanced and set up path mapping. Map the folder on the server to a folder locally so that Netbeans knows which files to open locally when it hits these methods.