-
Notifications
You must be signed in to change notification settings - Fork 685
Ltac Debugger: goals not updated when one steps through tactics defined in different files. #15903
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
Comments
This is a display issue. The updated goal is shown in the Goal panel of The underlying issue is that CoqIDE allows multiple active debug Coq sessions, so how does CoqIDE know which debug session goals the user wants to see from moment to moment? CoqIDE could be stopped in Please try it with multiple windows. |
Thanks, I can indeed see the update, but this is all rather weird:
what is the I see the issue with multiple debug sessions. I would recommend to either not allow this - if this is really needed one can still launch two CoqIDE instances - or to have some way to select the active debug session or the default display (a buffer can also have a goal / proof state without debugging). If it makes things simpler I really would not allow multiple sessions. It doesn't make a lot of sense to make the usual case of a single session less useful in favor of a rather exotic multiple debug sessions use case. I don't know any other IDE which allows multiple debug sessions. |
Ignore the goal panel in the secondary file. Only look at the goal panel of the top level script. The doc says:
Exactly. Windows/Detach Proof from the menu to make it a separate window.
It is the module name, derived from the filename
Yeah. I thought people could deal with some weirdness for a while, which I discussed in the doc. I think it's a fairly big change, best not to change everything at once--more likely I will break things and it would makes the reviews take even longer. I plan to add a number of new features such as Ltac2 before I address this. After that, I'd also like to make some general improvements bug fixes to CoqIDE after that. That may take a year :-(. |
@jfehrle : detaching the debugger panel doesn't work for me, because when I do so each press of F10 changes focus to the detached debugger panel, so that for stepping I have to do F10, click main window, F10, click main window, ... |
I see the same behavior in V8.15.0. Edit: never mind. |
You can press F10 and other debugger function keys while the focus is in the debugger panel or the Messages, Goal or Script panel of the top-level or top of stack buffer for the code you're running. |
This does not work for me (Coq Platform 8.15~2022.04.0, macOS, from sources). When I press F10 the debug panel gets focussed and further presses of F10 are ignored. |
I just tried that platform version on native Windows. It works as I said except that function keys are not forwarded from the top level goals panel. If you click on the header of the debug panel or the top-level proof/messages panels before you press F10, does that make any difference? That would be very surprising. It may be that focus doesn't work the same across platforms either because platform-specific code in GTK or differences in the window system it interfaces to. There probably aren't many multi-window applications so this behavior may have gotten proper attention for that case. It may be that an additional #15912 should avoid the issue. Perhaps you can apply it locally or at least in the next release of Coq Platform. |
I think it depends on the exact order in which panels are detached - I found that sometimes it does work - sometimes not. If I follow this procedure, it does not work:
If I detach all 3 message Windows (with the arrow detach buttons) and the proof view (via the menu), then start the debugger and then detach the debug Window F10 does work. I could reproduce both behaviors 2 times. |
Glad you found a workaround. |
Description of the problem
When stepping though a tactic in the Ltac debugger, the goal display is not updated when one steps through a tactic defined in a different file - even if one returns to the original file.
Consider these two files in the same folder:
File
Ltac_Debugger_Display.v
File
a.v
Now proceed as follows:
coqc a.v
coqide Ltac_Debugger_Display.v &
Goal
idtac
inb
and set a breakpoint with F8Ltac_Debugger_Display.v
This leaves one in a state where "a2" is printed in the Messages window, but the goal is still:
which is clearly wrong since the
idtac "a2"
comes after thesimpl
.In my experience, whenever one steps through a tactic in a separate file, the goal is not updated any more until the tactic execution ends.
As far as I remember (not 100% but pretty sure) this did work fine in the debugger preview.
Coq Version
@jfehrle : FYI.
The text was updated successfully, but these errors were encountered: