editor:// integration and PhpStorm from JetBrains Toolbox – changing bin directory

dakur
Member | 493
+
0
-

Hi all,

I've got a quick question. I've read this guide about how to register editor:// protocol in the system (specifically Windows in my case). But there is this thing, that when using with PhpStorm installed through JetBrains Toolbox, it has its own folder per each build (e.g. AppData\Local\JetBrains\Toolbox\apps\PhpStorm\ch-0\211.6693.120\bin) and there is no common shortcut which I can refer to in the handling JS.

What is your experience with this, do you update the handling JS every time your PhpStorm got updated?

Update:
Ok, I've found out there is phpstorm:// protocol already, but if I use it it does not do anything anyway, just outputs Failed to launch '<URL>' because the scheme does not have a registered handler into console. 🤷‍♂️

Last edited by dakur (2021-04-13 13:50)

Keeehi
Member | 36
+
+2
-

You can let toolbox generate shell scripts for you. So when it updates, it just change content of the script and path will stay same. So you can use it as a constant wherever you need to.

dakur
Member | 493
+
0
-

Thanks. That should work. But shouldn't work the phpstorm:// as well out of the box when shipped in PhpStorm?

Last edited by dakur (2021-04-15 10:34)

spaze
Generous Backer | 28
+
0
-

@dakur Did you manage to get it working somehow? I can't get the (built-in?) phpstorm:// handler working either.

dakur
Member | 493
+
0
-

No, I think I gave it up finally. I use the standard way – double shift search (with first letters which usually gives first match well) + entering line number (ctrl+g). Although it's not that comfortable still it's good enough in most cases.

SamuelThorn
Member | 29
+
0
-

@dakur: I came accross the same issue. I have switched to JetBrains Toolbox App, and my Tracy integration stopped working.

My solution for my Windows computer step by step. I have…:

  • enabled the “Generate Shell Scripts” in the JetBrains Toolbox App.
  • coppied the path from there into my PATH variable
  • changed the path in my open-editor.js to editor: 'phpstorm --line %line% "%file%"'
  • changed line 78 from shell.exec(command); to shell.run(command);

And now it works, and hopefully it will work after an update. ;-)

hrach
Member | 1836
+
+5
-

Since this was resurrected – Toolbox v2 is near and the major feature is that the path is stable.

SamuelThorn
Member | 29
+
0
-

@hrach: Thank you. I have tested it, and it works.