-2

I am expert in PHP. There are some JavaScript related bugs in my assignment given by my supervisor. I tried to fix them using Firebug. It is time consuming. Is there any other ways?

  1. Are there any good IDE's to tackle this issue?
  2. Are there any other developer tools except Firebug?

closed as off-topic by Dan Pichelman, user53019, Giorgio, user40980, gnat Oct 7 '13 at 3:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Dan Pichelman, Community, Giorgio, Community, gnat
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    What does PHP have to do with this? – yannis Oct 6 '13 at 12:42
  • If you're using Chrome, F12 can be useful. I'm not sure if it's better though. – Dan Pichelman Oct 6 '13 at 12:42
  • Chrome will be a great alternative. Do you any good IDE?. I use PHPStorm – user1427195 Oct 6 '13 at 12:47
  • 1
    A Javascript program with millions of lines? I find that statement hard to believe, and to think a company capable of creating such a mess has no standards for debugging them. – Reactgular Oct 6 '13 at 14:23
2

In order:

Narrow the scope.

  • Focus on the frontend, forget the backend and PHP for the time being. If javascript bugs are backend related (like AJAX), try mocking the backend (replacing the AJAX calls with something simpler in the test environment).
  • Find the module which is buggy. Javascript codebase likes evolving into a code soup when there's no discipline. Debugging is where a clean module separation shines - it's valuable to be able to test a javascript module in isolation.

Write unit tests.

  • Reproduce your bugs using automated tests to confirm their existence, make sure your fix works and they don't come back in the future.
  • You could use PhantomJS + CasperJS for frontend testing.

Use a debugger (if you still need to).

  • Learn what Firebug or Chrome Developer Tools offer you.
  • Or try something hot like trace.gl.
  • Don't expect an IDE to be a magic bullet to your problems. When you limit yourself to one tool, you're missing out.
  • This is what I wanted. Accepted. Wonderful – user1427195 Oct 6 '13 at 14:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.