?
Solved

Do I need a PHP project for this?

Posted on 2013-06-28
4
Medium Priority
?
290 Views
Last Modified: 2013-06-29
Well, this might be a pretty naive question.
I am new to PHP and am trying to run and walk-through the scraper code at the location http://pastebin.com/MTj4YtjU 

I have the latest NetBeans and WAMP installation on my windows machine. For me to do a step-by-step debug of this code, please let me know if it is okay to follow the following steps:

1) Create new PHP application project
2) Create a PHP file within the source folder and paste the source code.
3) Add breakpoint and Run debug.

Please let me know if my understandings are right.
0
Comment
Question by:sukhoi35
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:sukhoi35
ID: 39283668
I read I also need a xdebug application to successfully debug php code. Am currently downloading it.
0
 
LVL 12

Accepted Solution

by:
Richard Davis earned 1600 total points
ID: 39285007
Being new to any language is challenging enough in and of itself. When it comes to debugging, there are some less obtrusive methods in use by more seasoned programmers of languages like PHP & Perl, whereby the programmer will just drop in some dumping of variables to determine what's taking place at a given point in the execution of a script or program.

That having been said, I personally choose to  not use formal debuggers for languages like PHP & Perl as the setup is usually far more time intensive than just injecting a single line of code I can use to quickly ascertain what's up at that point in my execution.

If you really desire going the route of a formal debugger, then yes, you will need to install xdebug and perform the integration/setup of it into your IDE before you can get it to work at any level of productive use.

In PHP, I like to use the following snippet for my debugging;

# I use this when I want the output to appear in a browser
print "<pre>"; print_r($var); print "</pre>";
# I use this when I want the output to appear in a console
print_r($var);

Open in new window


Hope this helps.

~AB
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 400 total points
ID: 39285386
0
 

Author Closing Comment

by:sukhoi35
ID: 39286345
Thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question