gwomacks/php-debug

Uncaught TypeError: undefined is not a function

Closed this issue · 2 comments

[Enter steps to reproduce:]

  1. Configure path maps like {"localPath":"/home/tgomes/workspace","remotePath":"/var/www"}
  2. Click on Path Maps button when debug interface is open

Atom: 1.26.1 x64
Electron: 1.7.11
OS: Ubuntu 16.04.4
Thrown From: php-debug package 0.3.4

Stack Trace

Uncaught TypeError: undefined is not a function

At /home/tgomes/.atom/packages/php-debug/lib/helpers.js:36

TypeError: undefined is not a function
    at Object.exports.generatePathMaps (/packages/php-debug/lib/helpers.js:36:23)
    at DebbuggingContext.handlePathMapsClick (/packages/php-debug/lib/engines/dbgp/debugging-context.js:168:35)
    at /packages/php-debug/lib/engines/dbgp/debugging-context.js:66:18
    at HTMLButtonElement.result (/packages/atom-debug-ui/lib/actions/actionbar.js:125:7)

Commands

     -9:23.9.0 settings-view:open (input.hidden-input)
     -9:05.2.0 core:cut (input.hidden-input)
     -9:04.1.0 core:paste (input.hidden-input)
     -9:01.3.0 core:cut (input.hidden-input)
  2x -9:00.1.0 core:paste (input.hidden-input)
     -7:43.7.0 core:move-left (input.hidden-input)
     -7:41.7.0 core:backspace (input.hidden-input)
     -7:40.9.0 core:confirm (input.hidden-input)
     -7:39.6.0 core:undo (input.hidden-input)
  5x -7:38.3.0 editor:move-to-beginning-of-word (input.hidden-input)
     -7:37.2.0 core:move-right (input.hidden-input)
     -7:34.4.0 core:paste (input.hidden-input)
     -6:43.4.0 core:backspace (input.hidden-input)
  7x -6:02.4.0 editor:move-to-beginning-of-word (input.hidden-input)
     -4:20.4.0 core:copy (input.hidden-input)
  4x -1:15.6.0 core:backspace (input.hidden-input)

Non-Core Packages

aesthetic-ui 4.0.0 
atom-beautify 0.32.4 
atom-debug-ui 1.0.4 
atom-ide-ui 0.12.0 
atom-material-syntax 1.0.8 
atom-material-syntax-dark 1.0.0 
atom-material-ui 2.1.3 
atom-show-project-name 0.1.4 
atom-ternjs 0.18.3 
autocomplete 0.47.0 
autocomplete-java 1.2.7 
autocomplete-modules 2.0.0 
autocomplete-xml 0.9.4 
behat-atom 0.1.2 
bliss-ui 0.6.0 
browser-plus 0.0.98 
busy-signal 1.4.3 
docblockr 0.13.7 
dracula-syntax 2.0.7 
emmet 2.4.3 
file-icons 2.1.20 
firacode 0.3.0 
git-plus 7.10.2 
highlight-selected 0.13.1 
html-head-snippets 0.2.0 
html-id-class-snippets 1.4.1 
hyperclick 0.0.0 
ide-java 0.8.3 
ide-json 0.2.1 
ide-php 0.7.14 
intentions 1.1.5 
jquery-snippets 11.0.0 
js-hyperclick 1.13.0 
lcov-info 0.12.0 
less-than-slash 0.18.0 
line-diff-details 1.9.0 
linter 2.2.0 
linter-javac 1.9.4 
linter-jshint 3.1.8 
linter-php 1.5.1 
linter-phpcs 1.6.8 
linter-phpmd 2.0.0 
linter-twig 0.4.2 
linter-ui-default 1.7.1 
lipsum 0.1.0 
local-history 4.3.1 
minimap 4.29.8 
minimap-autohider 1.5.4 
open-in-browser 0.5.2 
php-cs-fixer 4.1.1 
php-debug 0.3.4 
php-getters-setters 0.5.5 
php-ide-serenata 4.1.2 
php-twig 4.0.0 
phpunit 1.2.0 
project-manager 3.3.5 
script 3.17.3 
split-diff 1.5.2 
spotify-linux 0.3.2 
Sublime-Style-Column-Selection 1.7.4 
symfony-snippets 0.3.0 
teletype 0.13.2 
text-pastry 0.6.1 
theme-switch 0.6.0 
vaporwave-syntax 0.0.6 
vaporwave-ui 0.0.2 
xatom-debug-nodejs 0.9.3 
xml-formatter 0.11.0 

Documentation for path mappings could be better, unless you check the code, how is one supposed to know the format of the json object expected?

The pathmap format is actually an array of objects [{"remotePath":"","localPath":""}]. It's rare that you should need to manually manipulate the path maps, there is built in UI functionality to set them.