简体   繁体   English

Emacs中python模式下的Mx断点

[英]M-x breakpoints in python-mode in Emacs

I have read in a several places (eg here ) that I can use Mx space to add/remove breakpoints in my python files when debugging with Emacs. 我已经读过几个地方(例如here ),在使用Emacs进行调试时,可以使用Mx space在python文件中添加/删除断点。

However, when I type Mx space once I have opened pdb on the file, Emacs prompts me with a large autocompletion list, as if I were to type any other Mx command 但是,当我在文件上打开pdb时键入Mx space时,Emacs会以较大的自动完成列表提示我,就像我要键入任何其他Mx command

Q1: Q1:

How can I use Mx space to add or remove breakpoints once I have started a pdb session in Emacs? 在Emacs中启动pdb会话后,如何使用Mx space添加或删除断点?

Q2: Q2:

The top answer in the thread above says I should invoke the following two lines from pdb to use Mx space to add/remove breakpoints: 上面线程中的最高答案说,我应该从pdb调用以下两行以使用Mx space添加/删除断点:

import sys
sys.path.append('/path/to/directory/containing/views.py')

but what is views.py ? 但是什么是views.py Is that something specific to Django? 这是Django特有的吗?

I think you are mistaken. 我想你错了。 gud-break is set to Cx SPC ( SPC means space). gud-break设置为Cx SPCSPC表示空格)。 I guess this is just a typo in the linked post. 我想这只是链接文章中的错字。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM