I downloaded Mozilla-central and built it. I am able to run Firefox Nightly using ./mach run. Now I am following the instructions of MDN on how to use Eclipse CDT with Mozilla code. I downloaded Eclipse CDT on my mac and installed it. When I execute the following command:
./mach build-backend -b CppEclipse
It raises an exception saying: Failed to launch eclipse to import project. Ensure 'eclipse' is in your PATH and try again
I tried to add the eclipse's directory (Applications/Eclipse.app) to my PATH environment variable but I still get the same error.
Here is the complete trace:
0:00.46 /Users/****/src/mozilla-central/obj-ff-dbg/_virtualenvs/init/bin/python /Users/****/src/mozilla-central/obj-ff-dbg/config.status --backend CppEclipse Reticulating splines... 0:02.99 File already read. Skipping: /Users/****/src/mozilla-central/gfx/angle/targets/angle_common/moz.build Traceback (most recent call last): File "/Users/****/src/mozilla-central/obj-ff-dbg/config.status", line 1022, in config_status(**args) File "/Users/****/src/mozilla-central/python/mozbuild/mozbuild/config_status.py", line 146, in config_status the_backend.consume(definitions) File "/Users/****/src/mozilla-central/python/mozbuild/mozbuild/backend/base.py", line 143, in consume self.consume_finished() File "/Users/****/src/mozilla-central/python/mozbuild/mozbuild/backend/cpp_eclipse.py", line 158, in consume_finished self._import_project() File "/Users/****/src/mozilla-central/python/mozbuild/mozbuild/backend/cpp_eclipse.py", line 181, in _import_project raise Exception("Failed to launch eclipse to import project. " Exception: Failed to launch eclipse to import project. Ensure 'eclipse' is in your PATH and try again
Also, using the command:
./mach ide eclipse
I again get the same message:
Eclipse CDT 8.4 or later must be installed in your PATH. Download: http://www.eclipse.org/cdt/downloads.php
How can I resolve this issue? I just need to open Firefox nightly in Eclipse to be able to get the call-graph and navigate through its source code.
Run Eclipse first, then:
1- Command:
ps -ef |grep -i ecli
Output:
501 6410 1 0 2:57pm ?? 0:44.98 /Applications/Eclipse CPP.app/Contents/MacOS/eclipse 501 6428 6365 0 2:57pm ttys001
0:00.00 grep -i ecli
2- Add the binary to the path:
export PATH=/Applications/Eclipse\ CPP.app/Contents/MacOS/:$PATH
3- Test it:
which eclipse