Reputation: 180
PhpStorm doesn't open files via xdebug.file_link_format.
I tried different formats, and still doesn't work. I open link in new tab and nothing happens. Path is writing correct in address bar
xdebug.file_link_format = "phpstorm://open?file=%f&line=%l"
Upvotes: 0
Views: 419
Reputation: 180
I created my own protocol and custom program to open file in phpstorm
myproto.reg:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\myproto]
@="phpstorm"
"URL Protocol"=""
[HKEY_CURRENT_USER\Software\Classes\myproto\shell]
[HKEY_CURRENT_USER\Software\Classes\myproto\shell\open]
[HKEY_CURRENT_USER\Software\Classes\myproto\shell\open\command]
@="\"C:\\Program Files\\nodejs\\node.exe\" \"C:\\Users\\Alexander\\Desktop\\web\\ahk\\phpstorm.js\" \"%1\""
phpstorm.js:
const child_process = require('child_process');
const fs = require('fs')
let path = process.argv[2]
path = path.replace('myproto://','')
path = decodeURIComponent(path)
path = path.replace(/\/$/,'')
ls = child_process.exec('"C:\\Program Files\\JetBrains\\PhpStorm 2019.1.1\\bin\\phpstorm64.exe" ' + path + '')
php.ini:
xdebug.file_link_format = "myproto://%f:%l"
Upvotes: 1