I am trying to make the xdebug stack links to open files directly in netbeans, here is what I have done so far:
I created an executable file
/home/david/bin/netbeans.sh(which I chmoded +x) containing:#!/bin/bashurl=$2 file=${url#//} file=${file%?line=} line=${url#*line=}
/home/david/Programs/netbeans-8.1/bin/netbeans --open $file:$line
in
/etc/php5/apache2/php.iniI addedxdebug.file_link_format = "netbeans://%f?line:%l"in firebug "about:config" I created a new boolean:
network.protocol-handler.expose.netbeans => falseI created a new url-handler in Gnome's gconf:
gconftool-2 -t string --set /desktop/gnome/url-handlers/netbeans/command "/home/david/bin/netbeans.sh %s" gconftool-2 -t bool --set /desktop/gnome/url-handlers/netbeans/enabled true gconftool-2 -t bool --set /desktop/gnome/url-handlers/netbeans/needs_terminal false
now when I get an error, the files of xdebug's stack are links of type netbeans:///var/www/html/path/to/file.php, all good.
When I click on one of those links, I get the "Launch Application" window where I have to choose the application to open the file with: I select the executable I created in step 1, i.e.: /home/david/bin/netbeans.sh but I get an error message saying:
/home/david/: does not exist, or is not a plain file
And this is where I am stuck, I don't understand why I get this error and how to solve it.
gconftool-2 --owner=david /desktop/gnome/url-handlers/netbeansbut no luck – OSdave Feb 07 '16 at 14:12userin your/homeor you just forgot to change user to david somewhere. E.g. innetbeans.sh– Dimitri Podborski Feb 07 '16 at 14:16userinstead ofdavidin the question because I've seen people doing it (for security purpose I suppose). I've edited the question so that it reflects exactly what it is now. – OSdave Feb 07 '16 at 14:21/home/david/bin/netbeans.sh %sand in the script you are accessing$2but it should be$1– Dimitri Podborski Feb 07 '16 at 14:33/path/to/file:2netbeans:/path/to/file does not exist, or is not a plain file.should we use the chat? – OSdave Feb 07 '16 at 14:39