{"id":281642,"date":"2016-11-28T12:25:04","date_gmt":"2016-11-28T09:25:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=281642"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=281642","title":{"rendered":"\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u043a\u043e\u0434\u0443 \u0432 IDE \u043e\u0442 JetBrains \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c REST API \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e30\/091\/b18\/e30091b18aaf45939d01af4c84d38a53.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 exception stack trace (\u0432 \u043b\u043e\u0433\u0430\u0445 \u0438\u043b\u0438 \u043f\u0440\u0438 debug-\u0438\u043d\u0433\u0435). \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043a\u043e\u0434\u0430, \u043f\u0440\u044f\u043c\u043e \u043a\u043b\u0438\u043a\u043e\u043c \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0435 \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 stack trace \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438\u043b\u0438 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 <a href=\"https:\/\/www.jetbrains.com\/\">JetBrains<\/a> (\u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 PhpStorm), \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 REST API (\u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430) \u0438 command line launcher (\u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435). <\/p>\n<p>  <\/p>\n<h1 id=\"navigaciya-v-brauzere\">\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/h1>\n<p>  <\/p>\n<p>\u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 REST API IDE \u043e\u0442 JetBrains \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0437\u0434\u0435\u0441\u044c:<br \/>  <a href=\"http:\/\/develar.org\/idea-rest-api\/\"><a href=\"http:\/\/develar.org\/idea-rest-api\/\">http:\/\/develar.org\/idea-rest-api\/<\/a><\/a><\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u044d\u0442\u043e\u0433\u043e API \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0430\u043c\u043e\u0439 IDE. <\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0432\u044b\u0437\u043e\u0432\u0430\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u0432 API \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>http:\/\/localhost:63342\/<\/code><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0437\u043e\u0432\u0430 API \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a:<\/p>\n<p>  <\/p>\n<p><code>http:\/\/localhost:63342\/api\/file?file=src\/path\/to\/file.php&amp;line=100&amp;column=34<\/code><\/p>\n<p>  <\/p>\n<p>\u0433\u0434\u0435<br \/>  <strong>file<\/strong> \u2014 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043b\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0444\u0430\u0439\u043b\u0430<br \/>  <strong>line<\/strong> \u2014 \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435, \u043a\u0443\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043a\u0443\u0440\u0441\u043e\u0440<br \/>  <strong>column<\/strong> \u2014 \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b1d\/e7d\/4b6\/b1de7d4b69964e449e16751d02ed9b98.png\" alt=\"alert\"\/><\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 API \u0432 IDE, \u043c\u043e\u0436\u043d\u043e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445<br \/>  <code>Build, Execution, Deployment -&gt; Debugger<\/code><br \/>  \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 <em>&quot;Allow unsigned request&quot;<\/em> (\u043b\u0438\u0431\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u0435 \u043a\u043b\u0438\u043a\u0430\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 Ok).<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1b2\/d58\/804\/1b2d5880486240c986c6ed9f130d5a73.png\" alt=\"Settings\"\/><\/p>\n<p>  <\/p>\n<h1 id=\"primer-obrabotki--vyvoda-standartnogo-gettraceasstring-v-php\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e getTraceAsString() \u0432 php<\/h1>\n<p>  <\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d Regexp, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 stack trace \u0443 Exception \u0447\u0435\u0440\u0435\u0437 <a href=\"http:\/\/php.net\/manual\/ru\/exception.gettraceasstring.php\">getTraceAsString()<\/a><\/p>\n<p>  <\/p>\n<pre><code class=\"php\">try {     \/\/ some code }(\\Exception $e){     $traceAsString = preg_replace('\/#(\\d+) (.+?\\.php)\\((\\d+)\\):\/', '#$1 &lt;a href=&quot;#&quot; onclick=&quot;_goToEditorCodeLine(\\'$2\\', \\'$3\\'); return false;&quot;&gt;$2($3):&lt;\/a&gt;', $e-&gt;getTraceAsString() );     \/\/ some code }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 Exception \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u043e\u0439, \u043a\u043b\u0438\u043a \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432 IDE \u0444\u0430\u0439\u043b \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. <\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c JS \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e &quot;\u0434\u0435\u0440\u0433\u0430\u0442\u044c&quot; \u043c\u0435\u0442\u043e\u0434 API<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">function _goToEditorCodeLine(file, line){\u2028         var xmlhttp = new XMLHttpRequest();\u2028         xmlhttp.open(&quot;GET&quot;, &quot;http:\/\/localhost:63342\/api\/file?file=&quot; + file + &quot;&amp;line=&quot; + line, true);     xmlhttp.send();\u2028 }<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"primer-realizacii-na-primere-obrabotki-exception-v-symfony-3\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Exception \u0432 Symfony 3<\/h1>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0441 Symfony, \u044f \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c Exception \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0432 IDE \u0444\u0430\u0439\u043b\u0430. <\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0443\u0441\u043e\u0447\u0435\u043a \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u044b\u0432\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b Exception \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043f\u0430\u043f\u043a\u0435<br \/>  <code>app\/Resources\/TwigBundle\/views\/Exception\/<\/code><br \/>  \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430<\/p>\n<p>  <\/p>\n<ul>\n<li>exception.html.twig<\/li>\n<li>trace.html.twig<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 exception.html.twig \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>_goToEditorCodeLine()<\/code>, \u043a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043f\u0438\u0441\u0430\u043d \u0432\u044b\u0448\u0435.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 trace.html.twig \u043d\u0430\u0439\u0434\u0435\u043c \u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043a\u043e\u043d\u0435\u0446 \u0441\u0442\u0440\u0435\u043b\u043a\u0443, \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0432 IDE.<\/p>\n<p>  <\/p>\n<pre><code>    in {{ trace.file|format_file(trace.line) }} &lt;a href=&quot;#&quot; onclick=&quot;_goToEditorCodeLine('{{ trace.file }}', '{{ trace.line }}'); return false;&quot;&gt;&amp;rarr;&lt;\/a&gt;&amp;nbsp;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 stack trace \u043f\u043e\u044f\u0432\u043b\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0435\u043b\u043a\u0430, \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432 IDE \u0444\u0430\u0439\u043b \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442 \u043a\u0443\u0440\u0441\u043e\u0440 \u043d\u0430 \u043d\u0443\u0436\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c51\/8da\/1be\/c518da1bea9d47bbbd1127bc27e5222a.png\" alt=\"Symfony Exception\"\/><\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u0432\u0443\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043b\u044f Symfony 3 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0437\u0434\u0435\u0441\u044c:<br \/>  <a href=\"https:\/\/github.com\/dlevsha\/ide-code-navigation\"><a href=\"https:\/\/github.com\/dlevsha\/ide-code-navigation\">https:\/\/github.com\/dlevsha\/ide-code-navigation<\/a><\/a><\/p>\n<p>  <\/p>\n<h1 id=\"integraciya-s-komandnoy-strokoy-v-iterm2\">\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432 iTerm2<\/h1>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0432 MacOS \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 iTerm2, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e iTerm2 \u0438 Command Line Launcher \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 IDE, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0432 IDE \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 launcher-\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 IDE \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044e<br \/>  <code>Tool -&gt; Create Command-line Launcher...<\/code><br \/>  \u0438 \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u043f\u0443\u0442\u044c, \u043a\u0443\u0434\u0430 launcher \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e<br \/>  <code>\/usr\/local\/bin\/phpstorm<\/code> (\u0438\u043b\u0438 <code>\/usr\/local\/bin\/pstorm<\/code> \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439)<br \/>  \u0434\u043b\u044f IntelliJ IDEA \u044d\u0442\u043e<br \/>  <code>\/usr\/local\/bin\/idea<\/code> <\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 launcher \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442, \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043d\u0435\u043c. <\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0437\u043e\u0432\u0430:<br \/>  <code>\/usr\/local\/bin\/phpstorm --line 40 \/path\/to\/file<\/code><br \/>  \u0438\u043b\u0438<br \/>  <code>\/usr\/local\/bin\/phpstorm \/path\/to\/file:40<\/code><\/p>\n<p>  <\/p>\n<p>\u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442 \u0444\u0430\u0439\u043b <code>\/path\/to\/file<\/code> \u043d\u0430 40 \u0441\u0442\u0440\u043e\u043a\u0435.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e command line launcher \u0438 iTerm2.<\/p>\n<p>  <\/p>\n<p>\u0418\u0434\u0435\u043c \u0432 Edit Session-&gt;Advanced<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/eae\/fb5\/4aa\/eaefb54aaf7c4615a523dfc0047e3e46.png\" alt=\"iTerm\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0435\u043a\u0446\u0438\u0438 <code>Semantic History<\/code>, \u0438\u0437 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <code>run command...<\/code> \u0438 \u0432\u0432\u043e\u0434\u0438\u043c <\/p>\n<p>  <\/p>\n<p><code>\/usr\/local\/bin\/phpstorm --line \\2 \\1<\/code><\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u044c Cmd \u0438 \u043d\u0430\u0432\u0435\u0441\u0442\u0438 \u0441\u0442\u0440\u0435\u043b\u043a\u0443 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u0431\u043e \u0444\u0430\u0439\u043b \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u2014 \u043e\u043d \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u0438 \u043a\u043b\u0438\u043a \u043f\u043e \u043d\u0435\u043c\u0443 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442 \u0435\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0432 IDE.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043b\u043e\u0433\u0438 \u0438\u043c\u0435\u044e\u0442 \u0432\u0438\u0434<br \/>  <code>\/path\/to\/file\/:40<\/code>, \u0442.\u0435. \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0443\u043a\u0430\u0437\u0430\u043d \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0444\u0430\u0439\u043b\u0430 \u2014 \u0442\u043e\u0433\u0434\u0430 IDE \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. <\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 c \u043b\u043e\u0433\u0430\u043c\u0438 php-exception \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b\u0432\u043e\u0434 \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434<br \/>  <code>\/path\/to\/file\/(40)<\/code><br \/>  \u0442.\u0435. \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445.<br \/>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u043e \u043d\u0430 \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442. <\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043b\u043e\u0433\u0430 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0444\u043e\u0440\u043c\u0430\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 sed.<\/p>\n<p>  <\/p>\n<p><code>sed -E 's\/#([0-9]+) (.+\\.php)\\(([0-9]+)\\):\/#\\1 \\2:\\3\/g'<\/code><\/p>\n<p>  <\/p>\n<p>\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 tail<\/p>\n<p>  <\/p>\n<p><code>tail test.log | sed -E 's\/#([0-9]+) (.+\\.php)\\(([0-9]+)\\):\/#\\1 \\2:\\3\/g'<\/code><\/p>\n<p>  <\/p>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0435\u0449\u0435 \u0440\u0430\u0437 \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u043b\u044e\u0431\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u0438 \u043b\u044e\u0431\u043e\u0439 IDE \u043e\u0442 JetBrains.<\/p>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/315690\/\"> https:\/\/habrahabr.ru\/post\/315690\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e30\/091\/b18\/e30091b18aaf45939d01af4c84d38a53.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 exception stack trace (\u0432 \u043b\u043e\u0433\u0430\u0445 \u0438\u043b\u0438 \u043f\u0440\u0438 debug-\u0438\u043d\u0433\u0435). \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043a\u043e\u0434\u0430, \u043f\u0440\u044f\u043c\u043e \u043a\u043b\u0438\u043a\u043e\u043c \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0435 \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 stack trace \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438\u043b\u0438 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 <a href=\"https:\/\/www.jetbrains.com\/\">JetBrains<\/a> (\u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 PhpStorm), \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 REST API (\u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430) \u0438 command line launcher (\u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435). <\/p>\n<p>  <\/p>\n<h1 id=\"navigaciya-v-brauzere\">\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/h1>\n<p>  <\/p>\n<p>\u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 REST API IDE \u043e\u0442 JetBrains \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0437\u0434\u0435\u0441\u044c:<br \/>  <a href=\"http:\/\/develar.org\/idea-rest-api\/\"><a href=\"http:\/\/develar.org\/idea-rest-api\/\">http:\/\/develar.org\/idea-rest-api\/<\/a><\/a><\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u044d\u0442\u043e\u0433\u043e API \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0430\u043c\u043e\u0439 IDE. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-281642","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/281642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=281642"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/281642\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=281642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=281642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=281642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}