Child pages
  • [debugger] Restoring line number support in Debugger
Skip to end of metadata
Go to start of metadata

Below you can see a part of a report, that In-Portal debugger generates on each page load (only when debugging is enabled).

Among other things this report also have file information (name and line number) from which a particular record was added into debugger report. As you can see they are clickable, however to be able to open each file a special Launchy ( Firefox extension needs to be installed.


All seems nice, but line number, specified next to filename in debugger report isn't passed along to a program, that will open that file. Because of this developer need:

  1. to remember line number from a debugger report
  2. open file in Launchy
  3. use "Go To Line ..." menu of an editor, where file was opened to go to a line number, that he previously remembered

Doing all that on a regular basis might result in developer forgetting what's for he opened a file in first place.

At Intechnic we are using PHPStorm ( as our IDE. Among many other features it also support command-line invocation (see According to documentation the only way the line number can be passed to IDE is through "–line" parameter:

PhpStorm.exe C:\SamplesProjects\MetersToInchesConverter.php --line 3

Different IDE most likely will use different way of specifying line number in command line. To be compatible with most of IDE debugger don't pass line number to IDE at all.


I've been "Command-line Launcher" tool (, that is created automatically upon PHPStorm installation, but also can be created on request (e.g. if it's missing). I never noticed, but this tool is actually a wrapper script around PhpStorm main executable, that allows it to support larger variety of command-line option formats (same options, but typed in different ways). Along them I've found out one, that allowed "filename:line_number" notation to be used (same as you saw in debugger report before):

pstorm C:\SamplesProjects\MetersToInchesConverter.php:3

Note, that in this example I used newly created wrapper script "pstorm" instead of "PhpStorm.exe". After finding that the only thing, that was needed is to pass line number, from debugger, which was pretty simple.


Related Tasks

INP-1242 - Getting issue details... STATUS

1 Comment

  1. With line number being passed on to the editor things indeed works better, but still there is a way for improvement.

    For example due usage of Launchy Firefox add-on we have 2 problems:

    1. it works only on Firefox
    2. to open a file in editor you need to perform following steps each time (see image below):
      1. right click on link (this is a link, and naturally I want to left click on it)
      2. from a long context menu (menu size depends on installed add-on count, but it's usually pretty big) I need to:
        1. find Launchy sub-menu
        2. select then only editor, available from there (if there is only editor, then why it's in sub-menu) 

    As iTunes user I see, that there is nice "View in iTunes" button on each app detail page (e.g., that will launch iTunes app, that is installed locally.

    After investigating that subject I've found out, that it's done via "protocol handlers". Basically an app can register itself as handler if any protocol it likes to. After some coding I've created an app for Mac and set of scripts for Windows, that would do that for PhpStorm. For more details please visit

    To be able to use all of above you need following adding_custom_ide_support.patch patch to your In-Portal installation.