Jump to content

What is and how to set the 'Editor protocol handler' for NetBeans?


LAPS
 Share

Recommended Posts

In module settings of Tracy Debugger there is the field "Editor protocol handler" where you can set the Tracy Debugger::$editor variable:

154373425_Screenshot2023-01-22at14_26_55.thumb.png.51388a43cf72c66287e52ecd46fb857a.png

I done some research to set it for NetBeans, without success.

What is the editor protocol handler for NetBeans (if any) and how to set it in Tracy Debugger module settings?

 

I'm using Apache NetBeans 16 running on Mac OS Ventura 13.0.
Folder of NetBeans is /Applications/NetBeans/Apache NetBeans 16.app
Folder of my project files is /Users/<MyMacOSUserName>/NetBeansProjects/<MyProjectFolder>

Link to comment
Share on other sites

  • LAPS changed the title to What is and how to set the 'Editor protocol handler' for NetBeans?

@adrian I tried to set

Editor protocol handler:
netbeans://open?file=%file&line=%line
Local root path:
/Users/<MyMacOSUserName>/NetBeansProjects/<MyProjectFolder>/

That in the Tracy panel outputs the link (which seems to be correct) as follows:
netbeans://open?file=/Users/<MyMacOSUserName>/NetBeansProjects/<MyProjectFolder>/site/templates/template-name.php&line=139

But when I click on the link in the Tracy panel, NetBeans doesn't open and in the browser console I get the error message:
Failed to launch 'netbeans://open?file=netbeans://open?file=/Users/<MyMacOSUserName>/NetBeansProjects/<MyProjectFolder>/site/templates/template-name.php&line=139' because the scheme does not have a registered handler.

There is no guide about NetBeans for Mac. Probably NetBeans and/or Mac aren't configured well.  

😕

Link to comment
Share on other sites

Maybe something useful in one of these? They aren't Netbeans specific but seem to explain how to configure custom ones.
https://superuser.com/questions/548119/how-do-i-configure-custom-url-handlers-on-os-x
https://stackoverflow.com/questions/471581/how-to-map-a-custom-protocol-to-an-application-on-the-mac

or maybe you could use this as a starting point to write one for Netbeans? https://github.com/inopinatus/sublime_url

 

Link to comment
Share on other sites

@adrian, thank for pointing me out to a possible solution.

I'm trying SwiftDefaultApps and added the 'netbeans' URI Scheme to it. Now, when I click on the link in the Tracy panel the NetBeans app opens but the file (and the line) doesn't open.

In Tracy Debugger module settings, I tried to set 'Editor protocol handler' as follows:

netbeans://open?file=%file&line=%line
netbeans://open/?url=file://%file&line=%line
netbeans://file/%file:%line

... and some more, without success.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...