NetBeans
NetBeans
NetBeans is a cross platform IDE. If you prefer using another IDE, feel free, but you may need to configure project settings yourself.
We are currently using version 8.1 so that is the supported version for project configurations at this time.
Setting Up
Prerequisites
sudo apt-get install openjdk-7-jdk
Installing
Download NetBeans from the downloads page of their website: https://netbeans.apache.org/download/
The "All" version of the IDE is recommended if you are considering doing any wizard development or Java development (note: Android development with Echo does not require the Java components of NetBeans as Echo provides a C++ development environment). If you are only doing C++ development, select the smaller C++ only package.
Emblem NetBeans Modules
Many Emblem projects will only open after C/C++ and Emblem NetBeans Modules have been installed, else NetBeans will fail with the error <unrecognized project; missing plug-in?>.
Faster builds
If you have a multi core CPU you can enable parallel building with make using the -j flag followed by the number of parallel processes to use. To configure this:
- Open NetBeans options. Tools → Options
- Select the C/C++ category
- Select the Project Options tab
- In the Make Options box enter -j n where n is the number of processes to use.
Fixes for Ubuntu based systems (possibly others)
Allow Debugging Attachment
Fix for ptrace: Operation not permitted. error message when attempting to attach debugger:
sudo su - echo 0 > /proc/sys/kernel/yama/ptrace_scope
And to make the change permanent, set kernel.yama.ptrace_scope = 0 in /etc/sysctl.d/10-ptrace.conf
gksudo gedit /etc/sysctl.d/10-ptrace.conf
As seen here; thanks to @0xseantasker for finding it.
Better view of standard library containers in debug
GDB might not be able to read standard library containers (std::map, et cetera) and some tweaks will need to be done to read them...
Follow the instructions on the GDB wiki to install the python pretty-printers for viewing STL containers: http://sourceware.org/gdb/wiki/STLSupport
(Maybe also http://stackoverflow.com/a/13132091/423481 but this wasn't necessary for me)
This only works with g++ 4.7: ensure you have at least version 4.7.
Customisation
Keyboard Shortcut Mapping
As most of us have a day job, we are also required to use other tools that aren't quite as affordable as others (Visual Studio is $10K+ per license, other great IDEs are "free"). Visual Studio is a great IDE and due to its market dominance it is likely that programmers are familiar with the keyboard shortcuts. To make the transition to NetBeans as painless as possible, @0xseantasker took the time to map keyboard shortcuts to make them as similar as possible. The keyboard shortcuts are mapped as though Visual Studio + Visual Asset were in use. The following configuration files are available.
To use this mapping, go to "Tools -> Options" and press the Import button to import the zip file. Then select the Visual Studio keymap.
Troubleshooting
F24698: NetBeans11.0-VisualStudioKeyMap-1.0.zip | |
Oct 29 2019, 11:33 AM |
F4379: NetBeans8.2-VisualStudioKeyMap-1.0.zip | |
Sep 16 2017, 11:51 AM |
F54: NetBeans7.4-VisualStudioKeyMap-1.0.zip | |
Jun 11 2015, 9:32 AM |
F53: Netbeans7.4-VisualStudioVAX-1.0.zip | |
Jun 11 2015, 9:32 AM |
- Last Author
- 0xseantasker
- Last Edited
- Oct 2 2021, 11:34 AM