gwomacks / php-debug

Atom Text Editor package for PHP debugging
MIT License
119 stars 31 forks source link

Uncaught Error: Invalid watchpoint #111

Closed rugk closed 8 years ago

rugk commented 8 years ago

[Enter steps to reproduce below:]

  1. Try to add an invalid watchpoint (with ctrl-alt-w), e.g. by doing this when nothing is selected

Atom Version: 1.4.0 System: Windows 7 Thrown From: aligner package, v0.17.4

Stack Trace

Uncaught Error: Invalid watchpoint

At /D:/Users/%username%/.atom/packages/php-debug/lib/models/watchpoint.coffee:11

Error: Invalid watchpoint
    at new Watchpoint (file:///D:/Users/%username%/.atom/packages/php-debug/lib/models/watchpoint.coffee:7:17)
    at Object.module.exports.PhpDebug.addWatch (file:///D:/Users/%username%/.atom/packages/php-debug/lib/php-debug.coffee:269:13)
    at atom-workspace.subscriptions.add.atom.commands.add.php-debug:addWatch (file:///D:/Users/%username%/.atom/packages/php-debug/lib/php-debug.coffee:103:86)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\%username%\AppData\Local\atom\app-1.4.0\resources\app.asar\src\command-registry.js:260:29)
    at C:\Users\%username%\AppData\Local\atom\app-1.4.0\resources\app.asar\src\command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\%username%\AppData\Local\atom\app-1.4.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\%username%\AppData\Local\atom\app-1.4.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (C:\Users\%username%\AppData\Local\atom\app-1.4.0\resources\app.asar\src\window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (C:\Users\%username%\AppData\Local\atom\app-1.4.0\resources\app.asar\src\window-event-handler.js:3:61)

Commands

     -3:13 core:paste (atom-text-editor.editor.is-focused)
     -3:12 core:select-all (atom-text-editor.editor.is-focused)
     -3:10.5.0 editor:newline (atom-text-editor.editor.is-focused)
     -2:39 php-debug:toggleBreakpoint (atom-text-editor.editor.is-focused)
  2x -2:35.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -2:29.1.0 core:copy (atom-text-editor.editor.is-focused)
     -2:28.1.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -2:28 editor:newline (atom-text-editor.editor.is-focused)
     -2:26.8.0 core:move-down (atom-text-editor.editor.is-focused.autocomplete-active)
     -2:26.5.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused.autocomplete-active)
     -2:26.4.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
     -2:26 core:paste (atom-text-editor.editor.is-focused)
     -2:24.2.0 core:backspace (atom-text-editor.editor.is-focused)
     -2:23.8.0 core:move-right (atom-text-editor.editor.is-focused)
     -2:22.7.0 core:save (atom-text-editor.editor.is-focused)
     -0:09.6.0 php-debug:addWatch (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      [...],
      "atom-autocomplete-php",
      "php-class-tree"
    ],
    "packagesWithKeymapsDisabled": [
      "regex-railroad-diagram"
    ],
    "themes": [
      "atom-dark-ui",
      "one-dark-syntax"
    ]
  }
}

Installed Packages

# User
aligner, v0.17.4
aligner-php, v1.0.0
autocomplete-php, v0.3.7
linter-php, v1.1.6
linter-phpmd, v1.3.2
php-cs-fixer, v2.5.2
php-debug, v0.2.1
[...]

# Dev
No dev packages
cchamplin commented 8 years ago

Hopefully fixed in v0.2.2 - Released Today

esetnik commented 8 years ago

@cchamplin it still crashes if you submit an empty watchpoint in v0.2.2