python3-trepan icon indicating copy to clipboard operation
python3-trepan copied to clipboard

Broken mental model -- documentation

Open kevinsullivan opened this issue 10 years ago • 10 comments

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

kevinsullivan avatar Aug 03 '15 21:08 kevinsullivan

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 avatar Aug 04 '15 01:08 rocky

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 avatar Aug 18 '15 23:08 rocky

@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.

rocky avatar Aug 25 '15 02:08 rocky

Thanks for this work-around. --Kevin

kevinsullivan avatar Aug 25 '15 02:08 kevinsullivan

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)

cpitclaudel avatar May 31 '16 03:05 cpitclaudel

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 ;-)

rocky avatar May 31 '16 03:05 rocky

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 ;-)

:)

cpitclaudel avatar May 31 '16 04:05 cpitclaudel

It is gross, but sure. Next release.

rocky avatar May 31 '16 04:05 rocky

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

rocky avatar Nov 13 '16 02:11 rocky

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

kootenpv avatar Mar 27 '17 23:03 kootenpv