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.
If Js files are included in a HTML file with parameters breakpoints won't work. e.g. This does not work: <script src="/javascripts/application.js?1216255909" type="text/javascript"></script> This does work: <script src="/javascripts/application.js" type="text/javascript"></script> Ruby on Rails appends a time stamp to includes to prevent caching issues.
Could you please attach a sample project or steps to reproduce this issue.
Created attachment 66251 [details] Ruby on Rails project to demonstrate the issue
Open the attached project in Netbeans (must have Ruby support). I'm using netbeans-hudson-trunk-3092-ruby.zip. The project uses MySQL, if you have that run the rake task db:create (Alt+Shift+R) to generate the database (it is not used, but rails requires it). If you don't have MySQL installed then change /config/database.yml to suit. Run the project in the debugger (clientside should be enabled). Set a breakpoint in the /script/application.js file. The web pages server from this project contains more information and instructions.
This behavior of appending a query string to resource URLs occurs due to the use of RAILS_ASSET_ID variable. Have you tried to set it to "" (empty string) or unsetting it and see if it works better for you. Will that be an acceptable workaround (i.e. asking the user to set it to "" only during debug mode?). Currently the algorithm that matches the URL to a file in the project does an exact match of the resource name. As a general case the presence of a query string is assumed to indicate a dynamically generated resource and thus potentially not matching with the file content (e.g. line number may not match - which is basically how the line breakpoints are annotated and matched). BTW there is a workaround. Once the debugging sessions starts, go to the Sources window, select the entry that corresponds to the resource in question. If the entry looks like an URL simply double click it to open in an editor and then set the breakpoint in that editor. Prior to some recent fix - (changeset http://hg.netbeans.org/main/rev/fdee9f28e9c3 ) - such resource (with query strings) URLs were incorrectly mapped to the file path. In such cases the entry shows file path. In that case you can use the Goto Client Source action in the entries pop up menu to open the client side source of the resource and then set a breakpoint in it. As there is a workaround reducing the priority to P3.
Disabling the query strings is not an acceptable workaround for me. The query strings are used to prevent caching, which is important in development.
We may be able to provide a fix for this case (query string on .js files) and for other specific cases (query string used by xdebug for php), but in general the differences in query strings may indicate that the source files are different.
In the context of a Ruby on Rails application it is highly unlikely that the query string will mean different files. Maybe it needs to be a Project option, with the option defaulted to "ignore query strings" in Ruby on Rails applications.
Sandip is not going to fix this issue, I think. Can somebody else take over?
Sandip (might be somebody else from debuggerjavascript team), could you reassign your issue to somebody else. I'm not sure whether you will contribute to this plugin, but there are few outstanding issue which might influence areas like PHP debugger, Ruby debugger, etc. So we are sure they are handled appropriately. Thanks.
Looking into providing an option to ignore query strings.
This has been done for Firefox (not yet checked in). Passing to deva for required changes in IE extension.
Integrated into 'main-golden', will be available in build *200809201401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/86f5dc80b3e5 User: Quy Nguyen <quynguyen@netbeans.org> Log: #140442 - IDE modifications to support ignoring of query strings in JS debugger
Integrated into 'main-golden', will be available in build *200809210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/a08695ce5d9e User: deva@netbeans.org Log: #140442 - Additional changes for IE Add-on
Checked in. Marking fixed.
I'm not 100% sure that all the Internet Explorer fixes have been done, though.
Cannot test this: see #147949
Tested with IE on NetBeans IDE Dev (Build 20080929142249) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13 System: Windows XP version 5.1
Verified in NetBeans IDE Dev (Build 20080929142249) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13 System: Windows XP version 5.1