Apologize for not having more details but I noticed recently that if I try to create a new file in Atom's project view (in this case a Dockerfile), Atom would crash and you'd have to reload. If you tried to open the same file, it would crash. I tracked it down to disabling prettier-atom. I couldn't figure out how to get the code to link up with the electron pdb symbols to get more info but it was crashing in the exception_handler.
I've tried all kinds of things, starting Atom with clear window state, resetting Atom back to defaults (delete ~/.atom). The only thing that has worked is installing the 0.55.2 version of prettier. That version works fine.
I noticed it doesn't matter what the file is as long as it doesn't have an extension.
Operating System: Windows 10.0.17134.1246
Atom version: 1.44.0
Here are the packages I have installed:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Thanks!
Hmm, that's a pretty strange one. I wonder if the combination of docker + no file extension is somehow messing things up. I don't really use docker so I can't reproduce, but I can confirm that adding a new file from the project view (extension or no extension) seems to work fine.
I'm not much of a docker user so I'm not sure why that would be the case?
Thanks @robwise, like I said, it occurs regardless of the file as long as it doesn't have an extension. I tried README, ABC, etc. It doesn't just happen upon creation of the file in the project view, it also happens when you try to open the file. I tried disabling all the language plugins but it still happens. The only thing that made it stop occurring (other than disabling prettier-atom) was to revert back to the 0.55.2 prettier-atom. I noticed the changes that had been made recently had to do with removing lazy loading. My machine is very fast and loading from an SSD. Is it possible there is a race condition?
Also, I'd be happy to track this down but I don't know how to step through the code that is in question. Do you know how to do that? Perhaps I could find out for sure which plugin is crashing and where. Google search didn't turn up much information for how to do that unfortunately. Thanks for your help!
Yeah so Atom has a pretty robust console you can get to by hitting Cmd + Option + i. It has the usual tools for inserting breakpoints and such.
You can also use apm develop prettier-atom command to grab the repo and place it in your atom developer packages. Then you can yarn install and yarn start build.watch to get the dist files built (watch makes it so they will rebuild as you change the source code files). Lastly, use atom --dev ~/my_project to use the developer version of prettier-atom.
Now what you can do is make a change in the source files, wait for the dist files to rebuild, and then reload your atom window to pick up the changes. Now you can insert comments or play around with the code to see where the issue might lie.
@robwise I'm probably not going to work on this. I've decided to switch to using eslint-plugin-prettier for an unrelated reason. This made me realize I can just use linter-eslint for prettier, react and typescript together and no longer need prettier-atom. Someone else can work on this if they want to though. Thanks for the detailed information about Atom debugging. I'll definitely keep that in mind for the future. Cheers!
Yep definitely a good way to go if you're just using prettier for JS/TS
You can actually use the integration for any scope you want, you just have to add it to the linter-eslint configuration in Atom.