atom-python-debugger, I’m writing a function to clear all breakpoints. Breakpoints are stored in an array and in order to clear them all, each must be toggled individually and spliced out of the array. The
@toggle function takes care of an individual breakpoint. I came up with the following:
loopOverBreakpoints: () -> n = @breakpoints.length for i in [0..n-1] yield @breakpoints # always yield first element; it will be spliced out clear: () -> for breakpoint from @loopOverBreakpoints() @toggle breakpoint
When placed in a script, I can run this code and it performs as expected. However, when placed in my package, Atom complains on activation that there is an “unexpected (” on the
for ... from line. The error isn’t elsewhere in the code because commenting out the
for ... from loop makes Atom happy.
Any idea what that might be due to?