is it possible to debug with Netbeans xdebug between 2 separate projects?
是否可以在两个独立项目之间使用Netbeans xdebug进行调试?
One project is main code, second one is a library. I can successfully debug the main code, but the library does not work for me, the Netbeans debugger simply skips the breakpoints.
一个项目是主要代码,第二个是图书馆。我可以成功调试主代码,但是库对我来说不起作用,Netbeans调试器只是跳过断点。
I use Netbeans 7.2 and XDebug 2.2.1.
我使用Netbeans 7.2和XDebug 2.2.1。
I tried to create a symlink reference between projects as described here (http://*.com/questions/5746952/xdebug-across-projects-in-netbeans), but this did not solve the problem.
我尝试在这里描述的项目之间创建一个符号链接引用(http://*.com/questions/5746952/xdebug-across-projects-in-netbeans),但这并没有解决问题。
I also tried to link the 'lib' project as a 'library', but this also did not fix the problem.
我还尝试将'lib'项目链接为'库',但这也没有解决问题。
Any ideas?
有任何想法吗?
3 个解决方案
#1
1
I don't think Netbeans allows for debugging two different projects at the same time. So you will have to merge those two projects into one.
我不认为Netbeans允许同时调试两个不同的项目。因此,您必须将这两个项目合并为一个。
#2
1
It's an xdebug issue with symlinks, but looks like there's a patch if you want to try that: http://bugs.xdebug.org/view.php?id=627
这是一个带有符号链接的xdebug问题,但看起来有一个补丁,如果你想尝试:http://bugs.xdebug.org/view.php?id = 627
#3
0
My setup is this: I use a remote web server where the main project code and the library is hosted. I've mounted the main project as a drive on my local PC (using MacFusion), and have NetBeans work directly on the files there. My NetBeans Run Configuration is set up to use the remote web server.
我的设置是:我使用远程Web服务器,主要项目代码和库托管。我已经将主项目作为驱动器安装在我的本地PC上(使用MacFusion),并让NetBeans直接在那里的文件上工作。我的NetBeans运行配置设置为使用远程Web服务器。
The following recipe works for that setup:
以下配方适用于该设置:
- Create a symlink to the library in your main project (and have your SCM ignore it)
- 在主项目中为库创建符号链接(让SCM忽略它)
- Do a Scan for External Changes in NetBeans
- 在NetBeans中扫描外部更改
- Go to the Properties > Run Configuration for your main project
- 转到主项目的“属性”>“运行配置”
- Click the Advanced button and add a new line to the Path Mapping table
- 单击“高级”按钮,然后在“路径映射”表中添加一个新行
- Enter the absolute (remote host) path to the library in the Server Path column (not the path to the symlink you created)
- 在“服务器路径”列中输入库的绝对(远程主机)路径(不是您创建的符号链接的路径)
- Enter the local absolute path to the library symlink
- 输入库符号链接的本地绝对路径
I've yet to test this for a local stack setup, but I think it should work fine. The trick lies in the symlink and path mapping combo.
我还没有测试这个本地堆栈设置,但我认为它应该工作正常。诀窍在于符号链接和路径映射组合。
#1
1
I don't think Netbeans allows for debugging two different projects at the same time. So you will have to merge those two projects into one.
我不认为Netbeans允许同时调试两个不同的项目。因此,您必须将这两个项目合并为一个。
#2
1
It's an xdebug issue with symlinks, but looks like there's a patch if you want to try that: http://bugs.xdebug.org/view.php?id=627
这是一个带有符号链接的xdebug问题,但看起来有一个补丁,如果你想尝试:http://bugs.xdebug.org/view.php?id = 627
#3
0
My setup is this: I use a remote web server where the main project code and the library is hosted. I've mounted the main project as a drive on my local PC (using MacFusion), and have NetBeans work directly on the files there. My NetBeans Run Configuration is set up to use the remote web server.
我的设置是:我使用远程Web服务器,主要项目代码和库托管。我已经将主项目作为驱动器安装在我的本地PC上(使用MacFusion),并让NetBeans直接在那里的文件上工作。我的NetBeans运行配置设置为使用远程Web服务器。
The following recipe works for that setup:
以下配方适用于该设置:
- Create a symlink to the library in your main project (and have your SCM ignore it)
- 在主项目中为库创建符号链接(让SCM忽略它)
- Do a Scan for External Changes in NetBeans
- 在NetBeans中扫描外部更改
- Go to the Properties > Run Configuration for your main project
- 转到主项目的“属性”>“运行配置”
- Click the Advanced button and add a new line to the Path Mapping table
- 单击“高级”按钮,然后在“路径映射”表中添加一个新行
- Enter the absolute (remote host) path to the library in the Server Path column (not the path to the symlink you created)
- 在“服务器路径”列中输入库的绝对(远程主机)路径(不是您创建的符号链接的路径)
- Enter the local absolute path to the library symlink
- 输入库符号链接的本地绝对路径
I've yet to test this for a local stack setup, but I think it should work fine. The trick lies in the symlink and path mapping combo.
我还没有测试这个本地堆栈设置,但我认为它应该工作正常。诀窍在于符号链接和路径映射组合。