Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7499499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:50:36+00:00 2026-05-29T19:50:36+00:00

When I am debugging code in Emacs, I like to have two buffers open,

  • 0

When I am debugging code in Emacs, I like to have two buffers open, the first one with the source code I am debugging, and the second one with the debugger (pdb for Python).

I have the following keyboard shortcuts defined on my .emacs file:

(require 'gud)                                                                                                                                                
(define-key gud-mode-map '[C-f10] 'gud-next)                                                                                                                  
(define-key gud-mode-map '[C-f11] 'gud-step)                                                                                                                  
(define-key gud-mode-map '[C-f5] 'gud-cont)                                                                                                                   
(define-key gud-mode-map '[C-f12] 'gud-break) 

With the above, I can trigger the GUD shortcuts for gud-next, gud-step, etc. from the buffer where pdb is running, but I can’t trigger them from the buffer that has the python code.

I would like to use keyboard shortcuts on the buffer with the source code to trigger GUD commands for the debugger. Is there any way to do this?

I am using the most recent version of python-mode (6.0.4) and Emacs 23.3.1.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T19:50:38+00:00Added an answer on May 29, 2026 at 7:50 pm

    Try using global-set-key instead:

    (global-set-key [C-f10] 'gud-next)
    (global-set-key [C-f11] 'gud-step)
    (global-set-key [C-f5] 'gud-cont)
    (global-set-key [C-f12] 'gud-break)
    

    IIRC, this worked for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am debugging some python code in emacs using pdb and getting some import
I am running Emacs 23.2 with python.el and debugging some Python code with pdb
I have some debugging code that looks like the following: #define STRINGIFY(x) #x #define
I have some debugging code that if executed while running with GBD attached should
Possible Duplicate: What's wrong with Delphi's “with” I am have a problem debugging code
I am debugging some code and have encountered the following SQL query (simplified version):
One of my pet peeves with debugging Perl code (in command line debbugger, perl
I have added some debugging code to my app which I want to call
I'm debugging code, and I have a strongly typed object that has around 30
As the question explains: I would like to add some debugging code that only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.