Any key opens a web inspector


I just got Atom beta invite and am itching to start. But I see a really weird behavior and cannot understand if it’s a bug or I’m simply doing it wrong.

  1. Start Atom editor.
  2. In an empty tab, press Cmd+S, name the file /tmp/my.cpp.

And now the editor gets into some funny mode wherein any key press opens a Web Inspector.

Editor seems to work ok if I don’t save it first - until I manually set language to C++ by clicking “Plain text” in the bottom.

Cant type in language C

I’ve seen this happen too (not working with C++) but I don’t know how to reproduce.


I’d guess an unhandled exception, perhaps from a buggy plugin. Next time it happens open the console part of the web inspector and see if there’s a backtrace.


This happens for me with the language set to C++/Objective-C++, strangely only on the first line. Stack trace:


This is the error I get:

Uncaught TypeError: Cannot read property 'c' of undefined /Applications/


That’s the one I see as well.


Yep. Same here. Happens with certain key combinations in both C and C++ (.c, .cpp, .h) files.

Super easy way to reproduce this:

  1. Open a new file
  2. Change the language to C++
  3. Type a forward slash /

For reference, Atom 0.80.0.


Plus one, I’ve seen it as well a couple of times.


Keep an eye on the GitHub issue for this.


The problem I think is that github is using slick to parse scopes (see scoped-property-store.js line 93), and slick gets confused by the ++s in the C++ scopes, of example:

{ '0': 
   { '0': 
      { combinator: ' ',
        tag: 'scope',
        classes: [Object],
        classList: [Object] },
     '1': { combinator: '++', tag: '*' },
     length: 2 },
  length: 1 }

notice the ‘combinator’ business.

I don’t know if the preferred fix is to change the grammar, or the parser. For now to regain a working, you could go into /Applications/ and run:

perl -pi -e "s/\.c\+\+/\.cxx/g;" c++.json
perl -pi -e "s/\.c\+\+/\.cxx/g;" c.json

SUPER WARNING: Obviously editing config files inside the executable is something that should be done with care, and don’t complain to me or github if you break anything!

SUPER SUPER WARNING: This will break ruby and objective-c, and there will be a patch to the central parsing engine which removes the need to do this.


0.81.0 was just published with this fix in there, it should roll out via the auto-updater over the next hour.

According to @kevinsawicki. Thanks for the quick fix!


I just had this problem with Atom 0.81.0, editing a JavaScript File, when fixing an error suggested by JSHint.

I can’t seem to be able to reproduce it again, and I was not wise enough to save the backtrace before closing the window :frowning:

What I do remember is that the error was at row 1009 of

          isReversed: _this.editor.getLastSelection().isReversed()

and the error was that getLastSelection() returned either undefined or null.

I’m sorry, I can’t be any more precise than that.