You are not logged in.
Pages: 1
Topic closed
Hi,
I've been trying to configure Emacs as a Python IDE. It turned out to be some quest. There's a sea of info on the subject. Something funny about the whole thing too: the available solutions are very different in nature, they lack clarity and simplicity and above all they are outdated to the point of irrelevance. One might suspect that since circa 2009 it should all work out of the box, but this obviously is not the case.
At last, mostly by luck, I stumbled on a neat and up-to-date package by Gabriele Lanaro: emacs-for-python. It's so good it would be unfair to complain about the usage to be held self-evident by the author .
Well, there's Gud among other goodies. It takes some fine tuning, as it turned out: running pdb under emacs . This simple yet barbarous hack involves copying pdb.py into the user directory so it can be run alongside Gud. It works all right, but I have some trouble believing my eyes. Is this really the way things are supposed to be? Predictably, it works by way of M-x pdb, but if the debugger is dropped into via pdb.set_trace() or pdb.runcall(), even the measly Gud "integration" is denied.
Believe me or not, I can find nothing useful on the Google.
Offline
python.el of the repo you mentiod should already suppot pdb.
PDB Tracking (it even supports ipdb!)
There are 3 different Python implementations for Emacs atm, I think, so use advice for the right one.
See https://github.com/fgallina/python.el/
Last edited by Pank (2012-03-17 11:38:06)
Arch x64 on Thinkpad X200s/W530
Offline
python.el of the repo you mentiod should already suppot pdb.
I guess so. Could you be more specific?
There are 3 different Python implementations for Emacs atm, I think, so use advice for the right one.
What is it? I am not as experienced as you are.
Offline
python.el of the repo you mentiod should already suppot pdb.
PDB Tracking (it even supports ipdb!)
Yes, both python.el files seem to be slightly different versions of the same file. I did M-x describe-mode on both and still have no idea what "PDB Tracking" does mean.
Offline
Pank wrote:python.el of the repo you mentiod should already suppot pdb.
I guess so. Could you be more specific?
Honestly, I haven't really used pdb I just used my own print(.)-statments when I need to debug something.
Pank wrote:There are 3 different Python implementations for Emacs atm, I think, so use advice for the right one.
What is it? I am not as experienced as you are.
- Fabian's new python.el, which I recommend. This is what you are using as well, it seems.
- Python-foundation's python-mode.el, which some adhere to.
- Dave Love's python.el shipped with Emacs.
There was some talk of distributing Fabian's python.el with Emacs, but for now it is just in the package-repo (of Emacs).
The source has some hints
;; Pdb tracking: when you execute a block of code that contains some
;; call to pdb (or ipdb) it will prompt the block of code and will
;; follow the execution of pdb marking the current line with an arrow.
When I enter a .py file I have an entry called debugger (which is not assigned a key-combo), which I guess should do the trick...
Arch x64 on Thinkpad X200s/W530
Offline
;; Pdb tracking: when you execute a block of code that contains some
;; call to pdb (or ipdb) it will prompt the block of code and will
;; follow the execution of pdb marking the current line with an arrow.
That's exactly what it is not doing!
So far I have found this . My problem indeed, but the thread leads nowhere.
That is, I can run a module in an "integrated" (pdbtrack) way, but I cannot drop into with pdb.set_trace() in an "integrated" way.
Last edited by Llama (2012-03-17 13:52:54)
Offline
Recommend Spacemacs, or purcell's emacs.d.
Python mode I suggest proofit404 / anaconda-mode
Offline
Please don't necrobump, jethronsun7.
Closing.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed