Navigate to the file from output in the terminal - WebStorm

You can use the following format to output text in the terminal via console.log and the path will be clickable:

at ($FILE_FULL_PATH:$LINE_NUMBER:$SYMBOL_NUMBER)

Example with the full path to the file:

at (/home/ubuntu/project/index.js:12:55)

However, if you're running WebStorm with exact file path's project's folder, you can use the following format:

at (./project/index.js:12:55)

Not possible using built-in terminal (please vote for IDEA-118566 and IDEA-154439).

Awesome Console plugin might be a solution; but it doesn't support built-in terminal (https://github.com/anthraxx/intellij-awesome-console/issues/23)

there is also Output Link Filter plugin that provides similar functionality, but it looks outdated and (also) doesn't work in built-in terminal

Update (2022): IDEA-118566 is already fixed, links should work. Please note that providing links for particular output needs adding specific logic handing such output. Thus, if you encounter missing links in a particular output, please file a separate issue request describing link output format and steps to reproduce such output.


Webstorm does in fact now have this functionality.

Note that the bug about this functionality being missing (linked in another answer) has been marked as fixed: https://youtrack.jetbrains.com/issue/IDEA-118566.


It's not quite a single click solution, but what I do, is double click the text so that it auto selects and copies the path, including line and char numbers to clipboard. Then use the shortcut for Goto File.... Hit paste (cmd+v) then Enter and it will take you to the exact location.

For me, the shortcut for Goto File... is cmd+shift+O - you can check your shortcut in the menu Navigate -> File...

Tags:

Webstorm