Running NetBeans with an Option

Sometimes I ask people to run Netbeans with an option to provide more log messages and help me to find out a solution of a problem in this way. NetBeans doesn't log all messages and if I want to obtain more detail messages to look what happen, the IDE has to be run with an option that set appropriate log level for certain class or classes. NetBeans uses standard Java Logging API and for example, when I want to more detail log from code that take care about FTP support, it's enough to run NetBeans with option (-Dorg.netbeans.modules.php.project.connections.ftp.level=FINE  in this case) that set the log level for appropriate class/classes in the right value.

Basically there are two ways how to achieve this. From command line or add the option to the configuration file.

 The first one is simple for people who run Netbeans from command line. I have already wrote about a useful option --userdir, that allows also run more NetBeans with different settings. So from command line on unix based systems

./netbeans.sh -J-Dorg.netbeans.modules.php.project.connections.ftp.level=FINE

or on Windows

netbeans.exe -J-Dorg.netbeans.modules.php.project.connections.ftp.level=FINE

The -J switch says to the NetBeans launcher to pass the property to the virtual machine.

The second way how to add an option is to write it into netbeans.conf file that is located in etc folder in your NetBeans instalation place. The property just add to the netbeans_default_options. You have to add again the -J switch, if you want to pass it to the VM. Now you can run the ide as usually from GUI and it will be run with the option.

Comments:

Very nice. It is a very helpful hint that is not just relegated to PHP, but NetBeans logging in general.

Posted by John Yeary on February 07, 2011 at 07:29 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today