fhukiel / levels-debugger-ruby

A debugger for use with the levels package for Ruby
MIT License
1 stars 1 forks source link

Uncaught TypeError: Cannot read property 'getPath' of undefined #1

Closed Pysis868 closed 8 years ago

Pysis868 commented 8 years ago

[Enter steps to reproduce below:]

  1. Open Ruby Test::Unit file
  2. From Command Pallette, choose "Levels Debugger: Toggle"
  3. Click "Start Debugging"

Atom Version: 1.8.0 System: Mac OS X 10.11.5 Thrown From: levels-debugger-ruby package, v0.2.0

Stack Trace

Uncaught TypeError: Cannot read property 'getPath' of undefined

At /Users/username/.atom/packages/levels-debugger-ruby/lib/viewmodels/debugger-viewmodel.coffee:142

TypeError: Cannot read property 'getPath' of undefined
    at DebuggerViewModel.module.exports.DebuggerViewModel.saveDocument (/Users/username/.atom/packages/levels-debugger-ruby/lib/viewmodels/debugger-viewmodel.coffee:142:5)
    at DebuggerViewModel.module.exports.DebuggerViewModel.startDebugging (/Users/username/.atom/packages/levels-debugger-ruby/lib/viewmodels/debugger-viewmodel.coffee:54:9)
    at LevelsDebuggerView.module.exports.LevelsDebuggerView.startDebugging (/Users/username/.atom/packages/levels-debugger-ruby/lib/views/levels-debugger-view.coffee:85:20)
    at HTMLButtonElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLButtonElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -4:17.4.0 core:close (atom-text-editor.editor.is-focused.power-mode)
     -3:30.6.0 command-palette:toggle (atom-text-editor.editor.power-mode.is-focused)
     -3:26.5.0 core:select-all (atom-text-editor.editor.mini.is-focused)
     -3:24.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -3:24.5.0 settings-view:install-packages-and-themes (atom-text-editor.editor.power-mode)
  2x -2:11.2.0 core:cancel (div.package-detail.panels-item)
  2x -2:04.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:25.1.0 core:select-all (atom-text-editor.editor.mini.is-focused)
     -1:22 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:23.2.0 command-palette:toggle (atom-text-editor.editor.power-mode.is-focused)
     -0:17.1.0 core:select-all (atom-text-editor.editor.mini.is-focused)
     -0:16.1.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:11.6.0 core:select-all (atom-text-editor.editor.mini.is-focused)
     -0:07.4.0 levels-debugger:toggle (atom-text-editor.editor.power-mode)

Config

{
  "core": {
    "allowPendingPaneItems": false,
    "closeEmptyWindows": false,
    "customFileTypes": {
      "source.ruby.rails": [
        ".railsrc"
      ]
    },
    "destroyEmptyPanes": false,
    "disabledPackages": [
      "vim-mode",
      "atom-prettify",
      "pretty-json",
      "todo-list",
      "linter-rails-best-practices",
      "0-env",
      "fold-lines",
      "linter-tidy",
      "pigments",
      "autocomplete-ruby",
      "linter-rubocop",
      "linter-erb",
      "atom-rails-debugger"
    ],
    "openEmptyEditorOnStart": false,
    "projectHome": "$HOME/Documents",
    "themes": [
      "genesis-ui",
      "one-dark-syntax"
    ]
  }
}

Installed Packages

# User
000-project-shell-env, v0.3.0
Sublime-Style-Column-Selection, v1.5.1
activate-power-mode, v0.5.2
atom-no-tab-close-button, v1.0.0
autocomplete-plus, v2.31.0
build, v0.59.0
cucumber, v0.5.0
cucumber-autocomplete, v0.6.3
custom-title, v1.0.1
debug, v0.0.1
environment, v1.2.0
file-icons, v1.7.5
genesis-ui, v0.5.0
git-diff-details, v1.3.0
hashrocket, v0.4.10
javascript-snippets, v1.2.1
language-dots, v0.0.4
language-fish-shell, v1.0.3
levels-debugger-ruby, v0.2.0
linter, v1.11.4
linter-js-yaml, v1.2.5
linter-sass-lint, v1.4.1
linter-xo, v0.14.1
minimap, v4.22.1
minimap-bookmarks, v0.3.1
node-debugger, v1.4.7
plist-converter, v0.1.2
rails-i18n-autocomplete, v0.3.0
ruby-block, v0.3.5
script-runner, v1.8.4
seti-icons, v0.4.5
tab-title, v0.3.3
test, v0.1.2
test-status, v1.0.0

# Dev
No dev packages
ghost commented 8 years ago

Thanks for your feedback.

It seems you don't have the levels (https://github.com/lakrme/atom-levels) and levels-language-ruby (https://github.com/lakrme/atom-levels-language-ruby) packages installed. Those are required to run the debugger. I've added dependency resolving to the newest version to automatically install those packages. Please note that this is still a work in progress and the levels-language-ruby package does not support debugging as of now. It will be added in the coming weeks.

Pysis868 commented 8 years ago

Ok, yea I just couldn't locate the package your README mentioned since it didn't have the exact name. At least the terminal comes up automatically now, and the pane to the right, it just says "Level not debuggable", but that should be a separate issue.

ghost commented 8 years ago

I've added a more precise description to the readme, naming the packages that are required. As for the "level not debuggable" issue, this is caused by the levels-language-ruby package which will receive an update in the near future to support debugging.