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.

Bug 152390 - debugger does not work on included file
Summary: debugger does not work on included file
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P2 blocker with 2 votes (vote)
Assignee: rmatous
URL:
Keywords:
: 152228 153758 (view as bug list)
Depends on: 156220 159141
Blocks:
  Show dependency tree
 
Reported: 2008-11-05 08:33 UTC by Ashizawa Kazunori
Modified: 2009-03-12 15:38 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (36.37 KB, image/png)
2008-11-05 08:34 UTC, Ashizawa Kazunori
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ashizawa Kazunori 2008-11-05 08:33:16 UTC
debugger does not work on included file

(Based on user's feedback)

Running NetBeans IDE 6.5 RC2 on Windows XP, and running apache22
on Solaris with XDebug enabled.

There are two files: PHP Web Page and PHP File.  The former file
include the latter.

Sample:
        <?php
        print "this is main<br>";
        include "included.php";
        print "end of main<br>";
        ?>

In debugger session, Step Into (F7) works fine on the first
print statement.  But when try to step into "included.php",
editor does not switch to "included.php".  Setting breakpoints
does not help.  Even if manually switch to "included.php",
debugger does not indicates which line is the current.

Call Stack window shows server-side full path.  I think it's odd.
file:///export/kitten/public_html/PhpProject1/test/included.php.include:7
(snapshot attached)
Comment 1 Ashizawa Kazunori 2008-11-05 08:34:30 UTC
Created attachment 73275 [details]
screenshot
Comment 2 beberlei 2008-11-12 09:59:16 UTC
I have an additional problem, which is probably a nested case of this bug:

Breakpoints in files of the projects "include path" are not recognized too.
Comment 3 beberlei 2008-11-12 11:08:14 UTC
changed to P1 since maybe only 1& scripts use no include files and this not working is quite evil :-)
Comment 4 rmatous 2008-11-12 15:12:30 UTC
I've tested these scenarios:
1/step into into included file in sources
2/put breakpoint (and stop there) into included file in sources 

the same also for file on include path

All cases worked for me (tested on Ubuntu) pretty well: the file was opened in editor, line was annotated (green color)
as usual.

So, the problem probably isn't so general and must be investigated deeply under which circumstances it may happen. So, I
suggest to make it P2 priority and evaluate it. Target milestone: 7.0 
Comment 5 Ashizawa Kazunori 2008-11-13 02:08:37 UTC
Please try hetero-environment: NetBeans IDE on Windows, and
apache on Solaris or Ubuntu.  I think this kind of combination
is quite popular.
Comment 6 rmatous 2008-11-13 12:17:42 UTC
thanks, definitely we will do

Mikha, please could you test && try to reproduce according to comments? 
Comment 7 Mikhail Matveev 2008-11-13 14:36:23 UTC
Vika is looking at the issue.
Comment 8 Victoria Zhukovskaya 2008-11-14 09:12:42 UTC
NetBeans IDE 6.5 (Build 200811100001) is ok for WinXP.
will test for Sol10
Comment 9 beberlei 2008-11-14 10:04:47 UTC
I am on kubuntu + netbeans 6.5rc2 and it does not work.
Comment 10 rmatous 2008-11-14 10:16:44 UTC
OK, problem probably isn't platform specific but rather project or configuration specific. Please could you prepare
simple netbeans project (containing a few files) and attach it (as zip, tar ...) to this issue
(http://www.netbeans.org/issues/createattachment.cgi?id=152390) and if needed, please give me deploying or configuration
instruction (incl.path, mod_rewrite or whatever which deserves to  be mentioned). Thanks in advance.
Comment 11 rmatous 2008-12-09 16:15:03 UTC
*** Issue 153758 has been marked as a duplicate of this issue. ***
Comment 12 vogelor 2008-12-09 19:35:18 UTC
i have the same problem and i found out, that the debugger "jumps" into the included file. the problem is, that the
"matching" of the files did not work. if your ide is at windows and your web-server is linux that the ide can't map
c:\xxx\yy\zzz\abc.inc.php to /var/www/abc.inc.php. i think the problem is about "/" versusu "\" and c:\ versus /var.
Comment 13 beberlei 2008-12-10 17:57:07 UTC
its very weird, but now it works for me in the case of included files and include pathed files in the same project. I
have setup a small project and even logged all the tcp traffic. Strange that it works now :-)
Comment 14 mathieuk 2008-12-13 08:47:49 UTC
@ vogelor:

Indeed, that is one of the problems and this means the debugger in netbeans, sadly, is useless to me. When using Netbeans with source files stored on a 
networked drive, Netbeans will always send the local path (for setting breakpoints and what not) to the debugger, instead of the remote path - which is 
what you need. 

I have proposed a mapping system to be included in Xdebug ( see http://xdebug.org/archives/xdebug-general/1416.html - it also describes the problem) 
but the developers there felt it's the IDEs place to implement such a system. Apparently, PDT / PHPEclipse already do. 

This means the problem isn't XP-specific, by the way.


Comment 15 Quality Engineering 2009-02-24 20:15:16 UTC
Integrated into 'main-golden', will be available in build *200902241401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/de338428008d
User: Radek Matous <rmatous@netbeans.org>
Log: source file and web server URI mapping related to #156220, #152390 II
Comment 16 Tomas Mysik 2009-02-24 20:15:52 UTC
Radku, would it be possible to fix this issue for M3? I hope your current work could fix this... I changed the milestone because of many
duplicates/requests. Thanks.
Comment 17 rmatous 2009-02-25 10:03:08 UTC
I believe this issue is more or less duplicate of  #156220. Could someone confirm that on recent dev builds this problem
isn't reproducible? Current dev builds:  http://deadlock.netbeans.org/hudson/job/PHP-build/ 

I need your feedback, thanks
Comment 18 rmatous 2009-02-25 14:13:05 UTC
Other related issue was fixed: #159141
Comment 19 rmatous 2009-02-26 11:41:08 UTC
I consider this issue as closed because all know for me reproducible problems were fixed (#156220, #159141) and I've
created RFE for custom path mapping(or better for its UI part because debugger itself is ready to use custom path mapping
#159199)

So, FIXED for me. For everyone: please, reopen if you still doesn't work for you in current dev builds - then please
decsribe your scenario or maybe open new issue.
Comment 20 rmatous 2009-03-12 15:38:47 UTC
*** Issue 152228 has been marked as a duplicate of this issue. ***