gwomacks / php-debug

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

Uncaught TypeError: Cannot read property 'indexOf' of undefined #273

Closed cyberbit closed 6 years ago

cyberbit commented 6 years ago

[Enter steps to reproduce:]

Somehow, a breakpoint for a file with a path of undefined got added. This makes a connected debugger fail and the server hang.

Atom: 1.26.1 x64 Electron: 1.7.11 OS: Microsoft Windows 10 Pro Thrown From: php-debug package 0.2.6

Stack Trace

Uncaught TypeError: Cannot read property 'indexOf' of undefined

At C:\Users\djmar\.atom\packages\php-debug\lib\helpers.coffee:71

TypeError: Cannot read property 'indexOf' of undefined
    at Object.exports.localPathToRemote (/packages/php-debug/lib/helpers.coffee:71:17)
    at DbgpInstance.module.exports.DbgpInstance.executeBreakpointRemove (/packages/php-debug/lib/engines/dbgp/dbgp-instance.coffee:218:20)
    at DbgpInstance.executeBreakpointRemove (/packages/php-debug/lib/engines/dbgp/dbgp-instance.coffee:1:1)
    at /packages/php-debug/lib/php-debug.coffee:204:53
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/scrollbar-style/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/scrollbar-style/node_modules/event-kit/lib/emitter.js:125:28)
    at GlobalContext.module.exports.GlobalContext.notifyBreakpointsChange (/packages/php-debug/lib/models/global-context.coffee:124:14)
    at GlobalContext.module.exports.GlobalContext.setBreakpoints (/packages/php-debug/lib/models/global-context.coffee:59:6)
    at Object.clearAllBreakpoints (/packages/php-debug/lib/php-debug.coffee:478:20)
    at /packages/php-debug/lib/php-debug.coffee:162:97)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.26.1/resources/app/src/command-registry.js:384:49)
    at Object.didConfirmSelection (~/AppData/Local/atom/app-1.26.1/resources/app/node_modules/command-palette/lib/command-palette-view.js:152:35)
    at SelectListView.confirmSelection (~/AppData/Local/atom/app-1.26.1/resources/app/node_modules/atom-select-list/src/select-list-view.js:401:26)
    at HTMLDivElement.core:confirm (~/AppData/Local/atom/app-1.26.1/resources/app/node_modules/atom-select-list/src/select-list-view.js:106:20)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.26.1/resources/app/src/command-registry.js:384:49)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.26.1/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.26.1/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.26.1/resources/app/src/window-event-handler.js:110:40)

Commands

     -2:39.1.0 intentions:highlight (input.hidden-input)
     -2:39 core:save (input.hidden-input)
     -2:35.2.0 intentions:highlight (input.hidden-input)
  3x -2:35.2.0 php-debug:toggleDebugging (input.hidden-input)
     -1:31.8.0 intentions:highlight (input.hidden-input)
     -1:31.7.0 window:toggle-dev-tools (input.hidden-input)
     -0:24.1.0 intentions:highlight (input.hidden-input)
     -0:24.1.0 command-palette:toggle (input.hidden-input)
  4x -0:17.3.0 core:move-down (input.hidden-input)
     -0:16.6.0 core:confirm (input.hidden-input)
     -0:16.6.0 php-debug:breakpointSettings (input.hidden-input)
     -0:13.6.0 intentions:highlight (input.hidden-input)
     -0:13.6.0 command-palette:toggle (input.hidden-input)
  5x -0:11 core:move-up (input.hidden-input)
     -0:06.5.0 core:confirm (input.hidden-input)
     -0:06.5.0 php-debug:clearAllBreakpoints (input.hidden-input)

Non-Core Packages

atom-autocomplete-php 0.25.6 
atom-beautify 0.32.2 
atom-ide-ui 0.11.1 
atom-underscore 0.1.3 
autoclose-html 0.23.0 
autocomplete-javascript 0.0.2 
busy-signal 1.4.3 
docblockr 0.13.7 
emmet 2.4.3 
file-icons 2.1.19 
git-plus 7.10.2 
highlight-selected 0.13.1 
ide-php 0.7.14 
intentions 1.1.5 
language-blade 0.39.0 
language-dotenv 1.1.1 
language-nginx 0.8.0 
linter 2.2.0 
linter-phpcs 1.6.8 
linter-ui-default 1.7.1 
minimap 4.29.8 
php-debug 0.2.6 
php-integrator-base 3.5.0 
pretty-json 2.0.0 
project-manager 3.3.5 
cchamplin commented 6 years ago

Possibly fixed in 0.3.0. Can you retest and let me know.