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

Source window out of sync with ipdb window #229

Closed
rbarzic opened this issue Nov 26, 2018 · 11 comments
Closed

Source window out of sync with ipdb window #229

rbarzic opened this issue Nov 26, 2018 · 11 comments
Labels

Comments

@rbarzic
Copy link

rbarzic commented Nov 26, 2018

Hi,

I've installed realgud and tried it with ipdb and get this strange behaviour where the source code position indicated by ipdb is not updated in the source window (basically the green cursor in the source window is "late" compared to the current source line seen by pdb)

image

I have the following message at the startup of ipdb 👍
WARNING: your terminal doesn't support cursor position requests (CPR).

I don't have the problem when running with pdb

I've using realgud-20180925.10 from elpa on emacs 26.1

@rocky
Copy link
Collaborator

rocky commented Nov 26, 2018

See if commit b8b587b fixes this.

It looks like a new ANSI control sequence was added before the prompt (> ...) and that messed (messes?) up the location tracking.

@rocky
Copy link
Collaborator

rocky commented Nov 26, 2018

One other thing - if the synchonization occasionally gets off, you can sometimes for a resync by issuing up 0 in (i)pdb.

@rocky rocky added the ipdb label Nov 26, 2018
@rbarzic
Copy link
Author

rbarzic commented Nov 26, 2018

Thanks for the tip - Unfortunatly, I'm struggling a bit to install the realgud stuff from git when not having sudo access and a local installation of emacs under /opt and be sure that the right version is used by emacs. I think I've install the latest version properly but the bug seems to be still here. Is there a way to get the version of realgud from emacs ?

@rocky
Copy link
Collaborator

rocky commented Nov 26, 2018

This version of realgud is already on melpa.

To see whether you are getting the new code, you should not be seeing ASCII escape characters like
�[J> before where it shows where you are stopped or �[6C after listing the source code.

Also, you need to make sure you are running in new comint shell, so that the changed functions are picked up.: shell hook, which is one of the places where a change was made, stores a copy of the function and doesn't automatcally get updated when the function changes.

The simplest thing is to do here then is run a new emacs where you load everything from scratch.

Since Emacs is dynamic, all you need to do is load-file any of the files that have changed, before running realgud for the first time. To get a list of files that have changed, look at the commit.

And lastly, I note that for a guy that seems to request this much assistance you are relucant to star any project

@rbarzic
Copy link
Author

rbarzic commented Nov 26, 2018

Thanks - I was confused about the version to use because the commit you pointed to appears to be done 9 hours ago while the latest melpa version is 20180925.10 - which I read as "25 September 2018"- so I was not expected to get the fix through MELPA - thus I had to be sure to remove any realgud versions already installed and do a reinstallation using git. I think I got it right now.
And I was asking for a possible way to get the realgud version as some other modes( like Verilog-mode ) sometimes provide a way to get it easily from a menu or a command.

@rocky
Copy link
Collaborator

rocky commented Nov 26, 2018

Acually you are correct melpa: is out of date. I read the date wrong. But I guess it will catch up eventually.

If you look at the README.md there is a link to instructions for setting up. You read that, right?

@rbarzic
Copy link
Author

rbarzic commented Nov 26, 2018

Yes I did - And I don't have any ASCII escape sequence on screen. Only the message "WARNING: your terminal doesn't support cursor position requests (CPR)" at the beginning of the session.

@rocky
Copy link
Collaborator

rocky commented Nov 26, 2018

Ok. Well, if this doesn't do it, then I guess I would like to leave it here. Things work for me well enough with this. (Actually, I don't use ipdb at all.)

As this is open source feel free to dig in and investigate and/or fix. Or we can wait until someone else is interested in this.

@rbarzic
Copy link
Author

rbarzic commented Nov 26, 2018

ok I understand - I'm not particularly familiar with emacs interaction with other processes so I may not be able to help much on this unfortunatly

@rocky
Copy link
Collaborator

rocky commented Nov 26, 2018

No one is born understanding emacs interaction with other processes.

@rocky
Copy link
Collaborator

rocky commented Aug 9, 2019

Issue moved to realgud/realgud-ipdb #2 via ZenHub

@rocky rocky closed this as completed Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants