How to create a toolbox link that points to a line?

I am able to create toolbox links like this:

jetbrains://php-storm/navigate/reference?project=my_project&path=my_path

But how to add a line number to it?

adding

&line=42

does not work. 

It would be helpful to also know how to specify a column, if that can be done.

4 comments
Comment actions Permalink

Please try the ":lineno" notation, that should do the trick. Like:

jetbrains://php-storm/navigate/reference?project=my_project&path=my_path.php:10

 

 

0
Comment actions Permalink

Hi Vasiliy,

I tried that before and it also did not work, but I tried again to make sure, and it still does not work. But removing the line ":lineno" still works.

Here is exactly what I tried:

jetbrains://php-storm/navigate/reference?project=testground-1&path=index.php:10

Can you try it your browser and tell me the result? It completely fails to activate phpstorm and even go to the file, nevermind the line number. If it works for you, can you tell me what browser you use?

 

0
Comment actions Permalink

Hi,

Basically, I have already tried it before writing the post and it works fine for me (apart from the fact that ":10"  moves you to line 11, might be it counts from zero). I have Windows 10 machine with Chrome installed. 

What IDE version do you have installed by the way? As far as I know, this feature has been fixed in 2020.2:
https://youtrack.jetbrains.com/issue/IDEA-230983

Also, please bear in mind that at this moment it does not work when you have the file open already, here is what I found about it:
https://youtrack.jetbrains.com/issue/IDEA-238371

0
Comment actions Permalink

I am using below the version you mentioned, so that is why it probably does not work. I have the newest version though and will try it in that.

The link you gave described the issue perfectly, thanks for linking it.

Thanks for the help!

0

Please sign in to leave a comment.