Setting breakpoints crashes atom


#1

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?


#2

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?


#3

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?


#4

Can you try cloning the repository at https://github.com/atom/atom to ~/github/atom and see if that fixes the problem for you?


#5

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?


#6

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.


#7

Should I open a bug on github? Could this be caused by some kind of permission issue?


#8

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.


#9

Done, I’ve opened https://github.com/atom/atom/issues/11269 . Thanks Lee!


#10

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)