dpo / atom-python-debugger

IDE-like Python debugger for Atom
MIT License
42 stars 13 forks source link

Uncaught Error: This socket has been ended by the other party #7

Closed dacrovinunghi closed 8 years ago

dacrovinunghi commented 8 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.6.0 System: linux 4.4.5-1-ARCH Thrown From: python-debugger package, v0.0.2

Stack Trace

Uncaught Error: This socket has been ended by the other party

At events.js:141

Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (net.js:268:12)
    at PythonDebuggerView.module.exports.PythonDebuggerView.stopApp (/home/davz/.atom/packages/python-debugger/lib/python-debugger-view.coffee:127:29)
    at PythonDebuggerView.module.exports.PythonDebuggerView.runApp (/home/davz/.atom/packages/python-debugger/lib/python-debugger-view.coffee:73:6)
    at HTMLButtonElement.<anonymous> (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLButtonElement.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -1:22.7.0 python-debugger:toggle (atom-text-editor.editor.is-focused)
     -0:55.3.0 core:delete (atom-text-editor.editor.is-focused)
     -0:31.4.0 core:paste (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "autoHideMenuBar": true
  }
}

Installed Packages

# User
autocomplete-modules, v1.4.1
autocomplete-python, v1.7.0
python-debugger, v0.0.2
script-runner, v1.8.4

# Dev
No dev packages
dpo commented 8 years ago

Thanks. I just pushed a new version that should fix this. Please let me know.

dacrovinunghi commented 8 years ago

fixed tahnks

raunakns commented 8 years ago

Im still getting this error :/

dpo commented 8 years ago

Are there any steps you could indicate that would reproduce the issue? On what platform are you?

gryphon2411 commented 8 years ago

I have Windows 8.1, and I'm taking the following steps to reproduce the issue:

dpo commented 8 years ago

It's true that this package could and should be more robust, but you're explicitly short-circuiting the debugger. Why not terminate it using the functionality provided here?

gryphon2411 commented 8 years ago

I use the infinite code lines at the last lines of my __main__ module in order to keep it running until I hit the debugger's "Stop" button. However, when I hit the "Stop", the debugger won't stop. I don' understand why an infinite loop short-circuiting the debugger, because it is working as expected when running the code from the interpreter. Also, which functionality provided here to terminate it?

dosaki commented 8 years ago

I've got this issue as well. I tried printing the values of a dictionary while debugging and the debugger crashed. Now I can't start it again without restarting Atom

dpo commented 8 years ago

@dosaki Are you also on Windows?

dosaki commented 8 years ago

@dpo: I'm on Linux, Elementary OS.

$ lsb_release -a
Distributor ID: elementary OS
Description:    elementary OS Freya
Release:    0.3.2
Codename:   freya
$ lsb_release -a
Linux pimaker 3.19.0-65-generic #73~14.04.1-Ubuntu SMP Wed Jun 29 21:05:22 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
wlgrd commented 7 years ago

Windows 7 x64, package version 0.1.0, Atom 1.10.2.

Was debugging somewhat fine, but when trying to set my second breakpoint this comes up all the time. Keep up the good work though, would really like to see this reach a more stable state.

dpo commented 7 years ago

I do need to add some tests to the package but I don't have access to a Windows machine to try to reproduce the problem. On OSX I can't reproduce it. Let me know if you have suggestions of tests or more information to provide.

sseyboth commented 7 years ago

I can repro this bug fairly reliably on macOS Sierra. Happens almost every time I: 1/ Change the file to debug via the debugger commands text box, e.g. 'e=./manage.py' 2/ Hit the run button in the debugger pane

Let me know if there is any other info I can provide to help. Thanks for your excellent work on the python-debugger package!

bryan-adams commented 7 years ago

As @sseyboth has already mentioned the steps to reproduce the issue reliably, I will only add that I am able to reproduce the issue using the same steps, but I am on a Windows 7 Professional x64 system with Atom v1.12.6 and python-debugger package v0.1.0

Minys233 commented 7 years ago

Error: This socket has been ended by the other party at Socket.writeAfterFIN [as write] (net.js:286:12) at PythonDebuggerView.module.exports.PythonDebuggerView.stopApp (/home/minys/.atom/packages/python-debugger/lib/python-debugger-view.coffee:129:29) at HTMLButtonElement. (/home/minys/.atom/packages/python-debugger/node_modules/space-pen/lib/space-pen.js:220:36) at HTMLButtonElement.dispatch (/home/minys/.atom/packages/python-debugger/node_modules/jquery/dist/jquery.js:4435:9) at HTMLButtonElement.elemData.handle (/home/minys/.atom/packages/python-debugger/node_modules/jquery/dist/jquery.js:4121:28)

Also encountered this, and i'm using the python from anaconda.

Rayree commented 7 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.16.0 x64 Electron: 1.3.13 OS: Unknown Windows version Thrown From: python-debugger package 0.2.0

Stack Trace

Uncaught Error: This socket has been ended by the other party

At events.js:160

Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (net.js:286:12)
    at PythonDebuggerView.module.exports.PythonDebuggerView.stopApp (/packages/python-debugger/lib/python-debugger-view.coffee:129:29)
    at PythonDebuggerView.module.exports.PythonDebuggerView.runApp (/packages/python-debugger/lib/python-debugger-view.coffee:72:6)
    at /packages/python-debugger/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLButtonElement.dispatch (/packages/python-debugger/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (/packages/python-debugger/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -3:57.7.0 python-debugger:toggle (input.hidden-input)
     -3:53.3.0 core:backspace (input.hidden-input)
     -3:48.1.0 core:move-left (input.hidden-input)
  2x -3:37.4.0 core:move-right (input.hidden-input)
     -3:36.4.0 markdown-writer:insert-new-line (input.hidden-input)
     -3:36.4.0 editor:newline (input.hidden-input)
     -3:35.7.0 markdown-writer:insert-new-line (input.hidden-input)
     -3:35.7.0 editor:newline (input.hidden-input)
     -3:33.2.0 core:backspace (input.hidden-input)
     -3:32.3.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
     -3:30.1.0 core:move-left (input.hidden-input)
     -3:26.7.0 markdown-writer:insert-new-line (input.hidden-input)
     -3:26.7.0 editor:newline (input.hidden-input)
     -3:26.5.0 markdown-writer:insert-new-line (input.hidden-input)
     -3:26.5.0 editor:newline (input.hidden-input)
  2x -2:51.7.0 core:backspace (input.hidden-input)

Non-Core Packages

activate-power-mode 1.4.0 
atom-beautify 0.29.23 
atom-html-preview 0.1.22 
atom-terminal-panel 4.4.4 
atomic-chrome 0.3.0 
autocomplete-modules 1.6.9 
autocomplete-python 1.8.63 
color-picker 2.2.5 
editor-settings 1.1.2 
emmet 2.4.3 
file-icons 2.1.4 
filecolor 0.4.0 
git-plus 7.7.0 
markdown-scroll-sync 2.1.2 
markdown-table-formatter 2.9.0 
markdown-writer 2.6.4 
minimap 4.28.1 
php-integrator-autocomplete-plus 1.5.0 
pigments 0.39.1 
python-debugger 0.2.0 
sync-settings 0.8.1 
tasks 2.6.6 
tool-bar 1.1.0 
tool-bar-almighty 0.8.2 
tree-view-background 0.4.1