Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Documentation] savvy Netbeans ide users (or eclipse) - vanilla question

peregrineperegrine MVP
edited April 2012 in Vanilla 2.0 - 2.8

I can direct netbeans to a particular page in a vanilla and the page with xdebug pops up in my browser. Is there a way to click on something in the web page and have the netbeans code continue in the debugger until some beakpoint.
I can get the breakpoints and tracing in the netbeans ide, but is there some magic to make the debugger continue from clicking in the browser itself.

or if this can be done with eclipse - that would be fine too.

I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Best Answer

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓

    Once xdebug has attached to your process it should continue to stop at breakpoints even when you follow links. Try putting a breakpoint on another page.

    That being said, xdebug is not a polished tool. I've used it on both Windows and OSX and it's been a real pain in both cases. On Windows I've had to try multiple versions of xdebug just to get it to work at all. On OSX it's been a bit easier, but I often have to restart Netbeans because xdebug has hijacked a process.

    If you can't get xdebug to work then I recommend searching for your xdebug version and then trying an earlier one depending on what other people have found works. Maybe try searching for your version of Netbeans to see what version of xdebug works with it. The final piece is whether or not your version of xdebug is compatible with your version of php. You have to search for all of these things.

    Xdebug can help you out a lot, but it's definitely a hackers type tool. You've got to fiddle with it a lot and there is not just one easy way to fix it.

Answers

  • hbfhbf wiki guy? MVP

    If you figure out a good way to get run-time debugging PLEASE post that in the wiki! I'm dieing to get away from:

    echo 'entering method x';
    echo 'test case was true';
    etc....

  • mcu_hqmcu_hq yippie ki-yay ✭✭✭

    In my experience, netbeans is very flaky with xdebugger..sometimes it will connect and other times it won't. I love the IDE though.

    print_r() and echo are what I use on a daily basis.

  • peregrineperegrine MVP
    edited April 2012

    thanks. I found the newest version always connects xdebugger with me. But crashes if you display watch variables. maybe someone will answer the question at the top and it will help all of us :).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I hope you guys don't get mad. Forgive me for this, but i figured you guys might know @tim @todd.

    and i don't think many people on the forum will have an answer as good as yours.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • hbfhbf wiki guy? MVP

    side note: I've found netbeans, eclipse and other 'dedicated' IDEs sooooo bad, i just use dreamweaver now... It understands a little php and css and since all i can do is echo and perform global searches in any of them, DW works just fine. I just wish it took care of indentation/printing rules.

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓

    Once xdebug has attached to your process it should continue to stop at breakpoints even when you follow links. Try putting a breakpoint on another page.

    That being said, xdebug is not a polished tool. I've used it on both Windows and OSX and it's been a real pain in both cases. On Windows I've had to try multiple versions of xdebug just to get it to work at all. On OSX it's been a bit easier, but I often have to restart Netbeans because xdebug has hijacked a process.

    If you can't get xdebug to work then I recommend searching for your xdebug version and then trying an earlier one depending on what other people have found works. Maybe try searching for your version of Netbeans to see what version of xdebug works with it. The final piece is whether or not your version of xdebug is compatible with your version of php. You have to search for all of these things.

    Xdebug can help you out a lot, but it's definitely a hackers type tool. You've got to fiddle with it a lot and there is not just one easy way to fix it.

  • peregrineperegrine MVP
    edited April 2012

    Thanks Todd

    The problem it turns out is that netbeans 7.1 actually fixed my problem with xdebug, but I just didn't notice it stays attached to the debugger, because i started multiple tabs of vanilla in my browser some attached to the debugger and some not. but if i click on the page attached to the xdebug it works fine (and netbeans tracks it) in linux. It does however crash occasionally with watch variables. Actually setting up xdebug is not that hard on linux. i just googled xdebug. Although I don't remember the settings now.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • UnderDogUnderDog MVP
    edited April 2012

    peregrine said:
    Actually setting up xdebug is not that hard on linux.

    Can you make a vanilla wiki page, por favor?

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited April 2012

    the problem is I don't remember exactly enough to specify what I did. But I do know that, not until I installed netbeans v7.1 did it work consistently attaching the debugger (and I did not have to make any more changes with xdebug).

    I tried to find some good pages to explain. Someone could put a link to the wiki article on the on the wiki. I don't know how to do that.

    http://ubuntuforums.org/showthread.php?t=1569309

    http://blog.thecodingmachine.com/content/setting-xdebug-debugging-environment-php-wamp-eclipse-pdt

    http://wiki.netbeans.org/HowToConfigureXDebug

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.