willyelm / xatom-debug

A Simple Debugger Provider for Atom
MIT License
71 stars 5 forks source link

Unable to add breakpoint: Uncaught TypeError: Invalid Point: (NaN, 0) #17

Open jmartin84 opened 7 years ago

jmartin84 commented 7 years ago
  1. open project in atom
  2. Attempt to set breakpoint on arbitrary line
  3. error is thrown

Atom: 1.16.0 x64 Electron: 1.3.13 OS: Mac OS X 10.12.4 Thrown From: xatom-debug package 1.6.2

Stack Trace

Uncaught TypeError: Invalid Point: (NaN, 0)

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:34

TypeError: Invalid Point: (NaN, 0)
    at Function.module.exports.Point.assertValid (/app.asar/node_modules/text-buffer/lib/point.js:63:15)
    at TextBuffer.module.exports.TextBuffer.clipPosition (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1033:13)
    at TextBuffer.module.exports.TextBuffer.clipRange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1021:20)
    at MarkerLayer.module.exports.MarkerLayer.markRange (/app.asar/node_modules/text-buffer/lib/marker-layer.js:215:46)
    at DisplayMarkerLayer.module.exports.DisplayMarkerLayer.markBufferRange (/app.asar/node_modules/text-buffer/lib/display-marker-layer.js:105:52)
    at TextEditor.module.exports.TextEditor.markBufferRange (/app.asar/src/text-editor.js:1781:38)
    at EditorManager.createBreakpointMarkerForEditor (/packages/xatom-debug/lib/editor/editor-manager.js:207:29)
    at /packages/xatom-debug/lib/editor/editor-manager.js:193:35
    at EditorManager.listenBreakpoints (/packages/xatom-debug/lib/editor/editor-manager.js:202:43)
    at /packages/xatom-debug/lib/editor/editor-manager.js:158:53)

Commands

     -2:56.4.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)

Non-Core Packages

advanced-open-file 0.16.6 
atom-beautify 0.29.23 
atom-dark-fusion-syntax 2.2.0 
atom-material-syntax 1.0.2 
atom-material-ui 1.3.9 
atom-mdtoc 0.8.3 
atom-ternjs 0.18.2 
atomatigit 1.5.5 
autocomplete-modules 1.6.9 
autocomplete-paths 1.0.5 
autoupdate-packages 1.3.1 
blame 0.10.3 
busy 0.7.0 
busy-signal 1.4.0 
docblockr 0.9.4 
easy-motion-redux 1.1.1 
environment 1.3.1 
ex-mode 0.14.0 
expand-region 0.2.7 
file-icons 2.1.3 
fixmyjs 1.4.1 
git-history 3.3.0 
git-plus 7.6.0 
golden-ratio 0.3.0 
highlight-line 0.12.0 
highlight-selected 0.13.1 
ink 0.6.5 
intentions 1.1.2 
javascript-snippets 1.2.1 
language-diff 0.7.0 
language-dustjs 0.3.0 
lines 0.13.1 
linter 2.1.4 
linter-clojure 1.1.3 
linter-eslint 8.1.6 
linter-jshint 3.0.3 
linter-markdown 4.0.0 
linter-ui-default 1.2.3 
markdown-scroll-sync 2.1.2 
markdown-writer 2.6.4 
maximize-panes 0.2.0 
merge-conflicts 1.4.4 
minimap 4.27.1 
move-panes 0.2.0 
nucleus-dark-ui 0.11.18 
Parinfer 1.17.0 
project-plus 0.9.0 
proto-repl 1.4.20 
proton-mode 0.15.0 
react 0.16.2 
react-snippets 0.7.2 
recent-files-fuzzy-finder 0.3.1 
relative-numbers 0.7.1 
release-notes 0.53.0 
swackets 0.26.0 
tab-switcher 1.5.4 
theme-switch 0.4.0 
vim-mode-plus 0.91.0 
vim-mode-plus-ex-mode 0.9.0 
xatom-debug 1.6.2 
xatom-debug-nodejs 0.9.1 
zentabs 0.8.8 
samhiatt commented 7 years ago

I noticed that I can add breakpoints after implementing this fix https://github.com/willyelm/xatom-debug/pull/41/commits/2320404483be7a3790569454c7993267484a46c9. That PR Might fix this issue.