Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken mental model -- documentation #3

Open
kevinsullivan opened this issue Aug 3, 2015 · 10 comments
Open

Broken mental model -- documentation #3

kevinsullivan opened this issue Aug 3, 2015 · 10 comments

Comments

@kevinsullivan
Copy link

I've installed trepan3k in my python34 environment. I can run trepan3k. I can invoke it from within my python program. However whenever I try to issue gdb-like commands, I get errors. The program seems to be in a REPL-sort of mode where all it's willing to do is to interpret python commands. So "list 3" doesn't work, "next" tells me that next is a , and print("hello world") works fine, but I don't need a REPL, I need a debugger. I'm obviously missing something simple, but I think that reflects perhaps an opportunity to improve the documentation. And advice? Thanks, --KS

@rocky
Copy link
Collaborator

rocky commented Aug 4, 2015

trepan reads its commands out of a command directory which will have trepan/processor/command in the path. The behavior you get will happen if that directory or the individual python commands aren't there or python can't read it.

@rocky
Copy link
Collaborator

rocky commented Aug 18, 2015

I just ran into this myself. I'm pretty sure the problem may be using a compressed format for wheel. I'll try to correct this soon.

@rocky
Copy link
Collaborator

rocky commented Aug 25, 2015

@kevinsullivan until I can figure out how to fix the trepan3 wheel, use easy_install. e.g.

easy_install trepan

I am sorry that trepan wheel is broken.

@kevinsullivan
Copy link
Author

Thanks for this work-around. --Kevin

@cpitclaudel
Copy link

Ah, maybe that's what I'm running to as well?

$ trepan3k ./test.py 
(/scratch/realgud/pdb/test.py:1): <module>
-> 1 a = 0

(trepan3k) next
<built-in function next>
(trepan3k) n
** NameError: name 'n' is not defined
(trepan3k) step
** NameError: name 'step' is not defined
(trepan3k) l
** NameError: name 'l' is not defined
(trepan3k) list
<class 'list'>
(trepan3k) run
** NameError: name 'run' is not defined
(trepan3k) R
** NameError: name 'R' is not defined
(trepan3k) r
** NameError: name 'r' is not defined
(trepan3k) q
** NameError: name 'q' is not defined
(trepan3k) quit
Use quit() or Ctrl-D (i.e. EOF) to exit
(trepan3k) quit()
** SystemExit: None
(trepan3k) Leaving
trepan3k: That's all, folks...

I installed using pip3. Perhaps it would be useful to show an error message and refuse to run if no commands are found?

Interestingly, trepan2 works fine (and as usual, is a brilliant piece of software)

@rocky
Copy link
Collaborator

rocky commented May 31, 2016

Yes, trepan3k is broken with pip. It just doesn't install files in its wheel, and I've rewritten the installer stuff several times. I'm not even sure I know how to do install-time checks.

Rant: Ruby is just soo much simpler, easier and more flexible here. node same thing. Perl is old and creaky but it has never given me as much problem as Python, especially Python 3.

I think easy_install works as does installing from source and github.

So much to do and not enough help ;-)

@cpitclaudel
Copy link

Thanks for the quick reply :) I think it would be great to print the easy_install suggestion at launch if trepan3k detects a broken install.

So much to do and not enough help ;-)

:)

@rocky
Copy link
Collaborator

rocky commented May 31, 2016

It is gross, but sure. Next release.

@rocky
Copy link
Collaborator

rocky commented Nov 13, 2016

I think starting with release 0.7.1 the problem with wheel installation has been solved. But please double check.

@kootenpv
Copy link

kootenpv commented Mar 27, 2017

After pip3.5 install trepan3k, I get:


pascal@MBP:~ $ trepan3k
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/bin/trepan3k", line 7, in <module>
    from trepan.cli import main
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/trepan/cli.py", line 24, in <module>
    from trepan import client as Mclient
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/trepan/client.py", line 27, in <module>
    from trepan.version import VERSION
ImportError: No module named 'trepan.version'

pip shows I have installed 0.7.3

Note that clone from github & python3.5 setup.py install works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants