question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto-detect more common editors

See original GitHub issue

Let’s send PRs for autodetecting more common editors for the error overlay! The feature already works both on macOS and Windows (thanks @levrik).

Currently detected editors are here:

const COMMON_EDITORS_OSX = {
  '/Applications/Atom.app/Contents/MacOS/Atom': 'atom',
  '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta': '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',
  '/Applications/Sublime Text.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
  '/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2': '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl',
  '/Applications/Visual Studio Code.app/Contents/MacOS/Electron': 'code',
};

const COMMON_EDITORS_WIN = [
  'Code.exe',
  'atom.exe',
  'sublime_text.exe',
  'notepad++.exe',
];

If your favorite editor isn’t in the list, but supports running from the command line with a line number, send a PR to launchEditor.js adding it to the list, and specifying its argument format.

To verify your change works, edit node_modules/react-dev-utils/launchEditor.js in your project, add a throw new Error('hi') to a component, and then verify that clicking on the error overlay takes you to the right place.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

17reactions
miraagecommented, Jun 28, 2017

In my opninion, WebStorm,PhpStorm and Idea should also be there. Despite the fact that JetBrains IDEs are offering to create a shortcut, still not a lot of people do it.

8reactions
jantimoncommented, Jun 27, 2017

This feature is really cool - you should create an independent npm package out of that! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Detect edit points using Scene Edit Detection - Adobe Support
Finding the original edit points in a video is necessary before you start editing the video. Using scene detection helps you to automatically ......
Read more >
Power BI Design Tip: Disable the Auto-Detect Relationship
To disable the auto-detect relationship feature in Power BI, you have to go to File>Options and Settings>Options. The two options that I ...
Read more >
Top 8 Free PDF Form Fillers in 2022
Is there a free PDF Form Filler? Sure, there are top 8 free PDF form fillers in 2022, and you can get the...
Read more >
Manage writing suggestions in Google Docs
Auto-correct can automatically correct capitalisation and spelling in Google Docs. It can also automatically detect links, lists and quotes.
Read more >
Development Environment Tools / Text Editor
A text editor is a software program that allows text files to be edited. ... Most serious developers will use an IDE because...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found