This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Create a simple JavaScript in PHP and run debugger (my example is attached). Set a breakpoint and press Continue button. Result: the breakpoint is completely ignored.
Created attachment 69899 [details] Code example
The breakpoints set in server side pages(like .php and .jsp) are not valid for client side debugging. You will have to set them in the read only pages that shows up when you do the client side debugging. What are the steps you followed? I recommend you the following steps 1)Start the debugging(make sure client side debugging is turned on) 2)In the read-only page that shows up in the editor window, set the required breakpoints 3)refresh the page in the browser
Yes, I set breakpoints in the read-only pages and follow steps you recommend. At the same time, step-by-step actions (like Step Over - F8) work properly.
Did u mean the breakpoint is ignored even when set in the read-only page. Can you attach your project and send me in which file and line number you were setting the breakpoint.
Correct, the breakpoint in the read-only page is ignored. The project contains only 1 PHP file, and its content is already attached. Now I'm attaching resulting r/o content. I tried to set breakpoint to any line inside of JavaScript code.
Created attachment 69904 [details] Resulting read-only content
I cannot reproduce this. I tested this with client-side only on to rule out interference from server side, especially since this is embedded in php code. Initially,I have to refresh the page to see the first breakpoint. Browsers shows only "Hello 1" when I then press continue in the IDE toolbar, the browser then shows additional "Test Hello 2". When I press continue again, the remaining code which is NOT javascript is output "Hello3", etc. So if breakpoints are set on the javascript in the editor's read/only file, it works. If I run another Debug process on the same file, not changing the read/only breakpoint as set. I didn't need to refresh the page again. Tested in Build 200809151401. Perhaps there is a misunderstanding about where to set the breakpoint. I set my breakpoints on the document.write lines. Setting them on any other lines like Hello1 or Hello3 would not work as they are not javascript. Is that what you did? Attaching my client-side source read only page.
Created attachment 69906 [details] client side embedded jscript in php
No, here is no misunderstanding about where to place breakpoints. I know that they should be placed only on lines containing JavaScript code. Below is my system info and exact sequence of steps: 1. Invoke Debug for PHP file, enable Client side debugging. 2. PHP Debugger is started. Click Continue on the debugger toolbar. 3. r/o HTML content is generated. 4. In Sessions window, make JavaScript debugger to be current. 5. Set a breakpoint on line document.write("Test"). 6. Click Pause on the debugger toolbar. 7. Switch to browser (Internet Explorer) and press Refresh. 8. Switch back to the IDE. PHP debugger is restarted. Click Continue on the debugger toolbar. 9. r/o content tab is open and JavaScript debugger is activated. Green line is on the first JavaScript code line vvv0=0; 10. Click Continue on the debugger toolbar. Result: debugger is not stopped at the breakpoint line.
Product Version: NetBeans IDE Dev (Build 200809150201) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)
Okay, good to know this is IE. I had been using Firefox. I do see the issue now, though Step6 - Pause is not available to me. I used Build 200809151401.
I tried the steps on the latest sources, and they worked for me. The Pause button is disabled before the first R/O page is displayed, probably because the JS debugger is still in the STARTING/READY state.
I'll try again withh the latest trunk build that has Deva's fix for the malformed file url object. I assume that fixes this?
I found that the problem may be that when the document is loaded partially, we need to set the breakpoints again when the document is modified. I have fixed this scenario. Try out the latest build and check if it is addressed.
Reproducible in 200809170201. Will check again with later builds.
Verified