I’ve been having this issue breakpoints in atom for a pretty long time, so I thought I should ask about it, maybe it’s a problem that people here had before. Basically, if I’m setting a breakpoint anywhere in one of the classes of my package atom crashes. The behaviour is usually like this: atom gets to the breakpoint, and execution stops. I step either into or out of the code, and then crash. Is this maybe a known issue? Could my environment be responsible for it? Is there any way of identifying what the problem is?
I just tried using the debugger in the Developer Tools. I set a breakpoint, triggered some code that would hit it, then did a bunch of step-overs, some step-ins, some step-outs and finally a continue running. Nothing crashed. I did this using Atom v1.8.0-dev-d6933af on Mac OS X 10.11.3. Do you have the
ATOM_DEV_RESOURCE_PATH environment variable set? If not, do you have the Atom source code available at
~/github/atom? Maybe it’s trying to read the Atom source and crashing when it isn’t found?
I’m using atom 1.6.0 stable. I don’t have ~/github/atom , nor do I have ATOM_DEV_RESOURCE_PATH set. Is there any other info I could provide you with?
Can you try cloning the repository at https://github.com/atom/atom to
~/github/atom and see if that fixes the problem for you?
That done it, thanks Lee! I’ve set a breakpoint and it looks like I’m able to step through the code without atom crashing. Any idea why that is?
My theory is that the debugger can’t read the source files out of the
app.asar that Atom comes packaged in and crashes. But if it can find the source at the
~/github/atom location, then things work fine.
Should I open a bug on github? Could this be caused by some kind of permission issue?
If the source of the problem is what I expect, it wouldn’t be a permissions issue, no. But the same behavior could be caused by a permissions issue, perhaps. Please file an Issue at https://github.com/atom/atom and @mention me on it.
Done, I’ve opened https://github.com/atom/atom/issues/11269 . Thanks Lee!
Lee, is there a quick fix to undoing the clone to
~/github/atom? My package tests won’t run now, and after deleting
~/github/atom, atom gives the following stacktrace:
Error: Cannot find module '/home/geo/github/atom/src/initialize-test-window.coffee' at Module._resolveFilename (module.js:336:15) at Function.Module._resolveFilename (/usr/share/atom/resources/app.asar/src/module-cache.js:383:52) at Function.Module._load (module.js:286:25) at Module.require (module.js:365:17) at require (module.js:384:17) at setupWindow (file:///usr/share/atom/resources/app.asar/static/index.js:85:22) at window.onload (file:///usr/share/atom/resources/app.asar/static/index.js:41:9)