question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught TypeError: _ref1.destroy is not a function

See original GitHub issue

[Enter steps to reproduce below:]

  1. Add a breakpoint and start debugging
  2. While debugger is running try to remove breakpoint / press CTRL + ALT + D

After this clicking stop then trying to CTRL + ALT + D will produce the following and leave the debugger pane open

Atom Version: 1.6.2 System: Ubuntu 15.10 Thrown From: php-debug package, v0.2.2

Stack Trace

Uncaught TypeError: _ref1.destroy is not a function

At /home/jacek/.atom/packages/php-debug/lib/php-debug.coffee:335

TypeError: _ref1.destroy is not a function
    at Object.module.exports.PhpDebug.toggleDebugging (/home/jacek/.atom/packages/php-debug/lib/php-debug.coffee:335:22)
    at atom-workspace.subscriptions.add.atom.commands.add.php-debug:toggleDebugging (/home/jacek/.atom/packages/php-debug/lib/php-debug.coffee:114:93)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app.asar/src/command-registry.js:260:29)
    at /opt/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/opt/atom/resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/opt/atom/resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -2:49.2.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
     -2:49.2.0 editor:newline (atom-text-editor.editor.is-focused)
     -2:43.9.0 core:move-down (atom-text-editor.editor.is-focused.autocomplete-active)
     -2:43.6.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
  3x -2:39 core:backspace (atom-text-editor.editor.is-focused)
     -2:29.7.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -2:29.7.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
     -2:29.7.0 editor:newline (atom-text-editor.editor.is-focused)
     -2:28.5.0 core:save (atom-text-editor.editor.is-focused)
     -2:18.1.0 core:backspace (atom-text-editor.editor.is-focused)
     -2:15.4.0 php-debug:toggleBreakpoint (atom-text-editor.editor.is-focused)
     -2:15.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:23.3.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:23.3.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:19.2.0 php-debug:toggleBreakpoint (atom-text-editor.editor.is-focused)
  3x -0:16.8.0 php-debug:toggleDebugging (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "base16-tomorrow-dark-theme"
    ]
  },
  "php-debug": {
    "PathMaps": [
      "/var/www/jmk/payroll-hub;/media/shares/work/dev-web/payroll-hub"
    ]
  }
}

Installed Packages

# User
docblockr, v0.7.3
emmet, v2.4.3
highlight-line, v0.11.1
highlight-selected, v0.11.2
line-ending-converter, v1.3.2
linter, v1.11.4
linter-php, v1.2.0
markdown-scroll-sync, v2.1.2
php-debug, v0.2.2

# Dev
No dev packages

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
robbieaverillcommented, May 12, 2016

This occurred for me when simply toggling debugging via the UI menu:

TypeError: _ref1.destroy is not a function
    at Object.module.exports.PhpDebug.toggleDebugging (/Users/robbieaverill/.atom/packages/php-debug/lib/php-debug.coffee:341:22)
    at atom-workspace.subscriptions.add.atom.commands.add.php-debug:toggleDebugging (/Users/robbieaverill/.atom/packages/php-debug/lib/php-debug.coffee:119:93)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1106:28)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/application-delegate.js:327:25)
    at emitThree (events.js:97:13)
    at EventEmitter.emit (events.js:175:7)
0reactions
nordicgit70commented, Oct 25, 2016

Issue occurred when a phtml source file changed and the breakpoint ended-up after the eof. The breakpoint keeps coming back, even when removed. And cannot stop debugging.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix the "Uncaught TypeError: destroy is not a function" Error in ...
It turns out this almost always happens when you try to return anything from your useEffect hook that is not a function.
Read more >
React — Uncaught TypeError: destroy is not a function - Medium
This function will run when the component unmounts. This can be thought of as roughly equivalent to the componentWillUnmount lifecycle method ...
Read more >
Getting error after I put Async function in useEffect
A Promise is not a function. so React stumbles and produces the error. To fix your app, change the useEffect arrow function to...
Read more >
destroy is not a function...from commitHookEffectListUnmount ...
This error pops up whenever I save to refresh (fast refresh)...it goes away when I make a different change only to re-appear in...
Read more >
typeerror: destroy is not a function at safelycalldestroy - You.com
The async function implicitly returns a Promise object which is incorrectly interpreted by the React framework to be a returned cleanup function.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found