0

Is it possible to set break points for JavaScript in Netbeans 7.2.1? I have Netbeans 7.2.1 running on OpenSUSE 12.1 and am developing PHP and JavaScript in the PHP module.

I am using two files: a php file called index.php and a JavaScript file called example.js. They both run fine but I am unable to set any break points in example.js and the break points in index.php appear as broken and have no effect when I run the program in debug mode.

I have installed xdebug-2.1.1 which I did after receiving errors messages when running my program in netbeans. Consequently, I no longer get the error messages but this has not helped with the break point problem.

Thanks,
Peter.

1 Answer 1

1

Setting a break point for JavaScript in Netbeans 7.2.1

I have installed xdebug-2.1.1

x-debug is for php and has nothing to do with javascript , i assume you are talking about javascript client side. what you need is the last version of netbeans and the plugin for browser debugging , in chrome you have the following one :

https://chrome.google.com/webstore/detail/netbeans-connector/hafdlehgocfcodbgjnpecfajgkeejnaa

it is easier to debug directly in the browser with the keyword debugger; and hitting F12 in chrome.

Sign up to request clarification or add additional context in comments.

4 Comments

When I try installing netbeans 7.3, I get the message "No X11 DISPLAY variable was set, but this program performed an operation which requires it." My VGA compatible controller is "Intel Corporation Core Processor Integrated Graphics Controller (rev 18)". Should I need to install the driver for this? Thanks, Peter.
I resolved my problem with installing netbeans 7.3. It was caused by my using sudo. When I did not use sudo, it installed with the only hitch being it was under my home directory instead of under the root directory.
I installed netbeans 7.3 and the Google Chrome browser to which I added Netbeans Connector. However it is not clear how to use it. I have been trying, without success, to find a tutorial/getting started for netbeans connector. Can you suggest a good link? Thanks very much! Peter.
Also, I found that I can add (unbroken) breakpoints in the JavaScript code (in the .js file) with netbeans 7.3. Unfortunately, the program does not break at those points when I run the program using the debug button. Thanks, Peter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.