debugging support in 2.2.0dev

164 views
Skip to first unread message

Steve

unread,
Jan 7, 2013, 1:26:12 PM1/7/13
to spyd...@googlegroups.com
I saw that the debugging toolbar/hot key support was merged into 2.2.0 dev over the holiday so I updated to it today.

I noticed that the console window must have focus for the hot keys to apply.  I thought this was something we had fixed before in Jed's branch?  Maybe it was removed or just didn't get merged properly?  Either way, it seems that if I have the editor window focused and the current tab is the file I'm debugging hot keys should cause the debugger to step in/out, continue, etc.  I'll continue to look at this and add more comments here.


Steve

unread,
Jan 7, 2013, 1:27:33 PM1/7/13
to spyd...@googlegroups.com
For reference I'm currently using 069e15d2159e

Steve

unread,
Jan 7, 2013, 2:59:03 PM1/7/13
to spyd...@googlegroups.com
The (Pdb) prompt is not being printed when the debugger halts.  I can still interact, but it's weird not seeing the prompt.

Steve

unread,
Jan 7, 2013, 3:29:39 PM1/7/13
to spyd...@googlegroups.com
print statements that happen before the first breakpoint aren't showing up in the console.

Jed Ludlow

unread,
Jan 7, 2013, 7:45:42 PM1/7/13
to spyderlib
 I can't comment on the print statement behavior or the pdb prompts not showing. I have not been able to reproduce those.

As to the issue of the console focus behavior, I just committed a fix to the main repository that should return the behavior back to how it was previously. Be advised, however, that the debugging toolbar does not work with IPython consoles.

Jed

Sylvain Corlay

unread,
Jan 18, 2013, 10:42:17 AM1/18/13
to spyd...@googlegroups.com
Is it the expected behavior that breakpoints are not highlighted graphically when reached while debugging? Another question is whether the pdb should stop at the first line of the executed script?
Thanks, Sylvain

Jed Ludlow

unread,
Jan 18, 2013, 10:53:42 AM1/18/13
to spyderlib
On Fri, Jan 18, 2013 at 8:42 AM, Sylvain Corlay <sylvain...@gmail.com> wrote:
Is it the expected behavior that breakpoints are not highlighted graphically when reached while debugging? Another question is whether the pdb should stop at the first line of the executed script?
Thanks, Sylvain


Actually, they should be highlighting. Can you provide some more detail on how to reproduce the behavior you are seeing?

As for stopping at the first line of the script, this is pdb's behavior by design. You just have to issue a continue command right after pdb takes over.

Hope this helps,

Jed 

Sylvain Corlay

unread,
Jan 19, 2013, 12:18:45 PM1/19/13
to spyd...@googlegroups.com

Regarding the highlighting of the breakpoints, I can see that the corresponding line gets the focus in the editor. The line becomes light grey. However, the breakpoint itself is not highlighted. I am running Spyder 2.2 beta1 on Ubuntu 12.04 64bits. I launched it with "python bootstrap.py". 
Thanks,
Sylvain

Jed Ludlow

unread,
Jan 19, 2013, 12:36:37 PM1/19/13
to spyderlib
On Sat, Jan 19, 2013 at 10:18 AM, Sylvain Corlay <sylvain...@gmail.com> wrote:
Regarding the highlighting of the breakpoints, I can see that the corresponding line gets the focus in the editor. The line becomes light grey. However, the breakpoint itself is not highlighted. I am running Spyder 2.2 beta1 on Ubuntu 12.04 64bits. I launched it with "python bootstrap.py". 
Thanks,
Sylvain

Ah, now I understand. The highlighting of the line in the editor is all that Spyder is designed to do today. Highlighting the breakpoint glyph itself in the margin is not currently part of the design. If you feel like that's an important feature, please open up an new issue here:


Jed

Sylvain Corlay

unread,
Jan 19, 2013, 11:16:50 PM1/19/13
to spyd...@googlegroups.com
Alright, thanks for your answer.

Regarding the debugger toolbar, I think this is one of the major improvement of this version. thank you for this feature. 

Another cosmetic remark about this toolbar is the choice for the icons. The arrows are a bit dubious to me. Could one use the same kind of icons as  usually found in other IDEs, for "step over", "step into", "debug step return" and "continue".

Thanks,
S.

Steve

unread,
Jan 20, 2013, 1:28:18 PM1/20/13
to spyd...@googlegroups.com
I agree on the icons.  Whenever I try to use the icons I always have to look at the tooltip to figure out what they mean. I just always stick to hot keys.

Carlos Córdoba

unread,
Jan 20, 2013, 3:55:41 PM1/20/13
to spyd...@googlegroups.com
Thanks for the suggestion. Please open an Issue for this and meanwhile I'll try to look what debugger icons KDevelop and other free IDEs are using.

Cheers,
Carlos

El 20/01/13 13:28, Steve escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/XsCCwq68TYcJ.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.

Jed Ludlow

unread,
Jan 21, 2013, 2:35:39 PM1/21/13
to spyderlib
On Sun, Jan 20, 2013 at 1:55 PM, Carlos Córdoba <ccord...@gmail.com> wrote:
Thanks for the suggestion. Please open an Issue for this and meanwhile I'll try to look what debugger icons KDevelop and other free IDEs are using.

Cheers,
Carlos

El 20/01/13 13:28, Steve escribió:
I agree on the icons.  Whenever I try to use the icons I always have to look at the tooltip to figure out what they mean. I just always stick to hot keys.

On Saturday, January 19, 2013 10:16:50 PM UTC-6, Sylvain Corlay wrote:
Alright, thanks for your answer.

Regarding the debugger toolbar, I think this is one of the major improvement of this version. thank you for this feature. 

Another cosmetic remark about this toolbar is the choice for the icons. The arrows are a bit dubious to me. Could one use the same kind of icons as  usually found in other IDEs, for "step over", "step into", "debug step return" and "continue".


What about the attached proposal, courtesy of the Fugue icons package by Yusuke Kamiyamane? [1]
From left to right in the attached image: Start debug, step over, step in, step return, continue, exit debug.

[1] http://p.yusukekamiyamane.com/

Inline image 2
debug_icons.PNG

Sylvain Corlay

unread,
Jan 22, 2013, 10:26:36 AM1/22/13
to spyd...@googlegroups.com
I like it better than the original arrows. Maybe having a second blue dot for the "jump into" and "jump out" would be more self-explanatory. 
Thanks again for your work, 
Sylvain

Sylvain Corlay

unread,
Jan 22, 2013, 2:40:31 PM1/22/13
to spyd...@googlegroups.com

h

On Tuesday, January 22, 2013 10:26:36 AM UTC-5, Sylvain Corlay wrote:
I like it better than the original arrows. Maybe having a second blue dot for the "jump into" and "jump out" would be more self-explanatory. 
Thanks again for your work, 
Sylvain

On Monday, January 21, 2013 2:35:39 PM UTC-5, Jed Ludlow wrote:
On Sun, Jan 20, 2013 at 1:55 PM, Carlos Córdoba <ccord...@gmail.com> wrote:
S.
 
Thanks for the suggestion. Please open an Issue for this and meanwhile I'll try to look what debugger icons KDevelop and other free IDEs are using.

Cheers,
Carlos

El 20/01/13 13:28, Steve escribió:
I agree on the icons.  Whenever I try to use the icons I always have to look at the tooltip to figure out what they mean. I just always stick to hot keys.

On Saturday, January 19, 2013 10:16:50 PM UTC-6, Sylvain Corlay wrote:
Alright, thanks for your answer.

Regarding the debugger toolbar, I think this is one of the major improvement of this version. thank you for this feature. 

Another cosmetic remark about this toolbar is the choice for the icons. The arrows are a bit dubious to me. Could one use the same kind of icons as  usually found in other IDEs, for "step over", "step into", "debug step return" and "continue".


What about the attached proposal, courtesy of the Fugue icons package by Yusuke Kamiyamane? [1]
From left to right in the attached image: Start debug, step over, step in, step return, continue, exit debug.

[1] http://p.yusukekamiyamane.com/

Inline image 2Here is the kind of thing that I had in mind.
debug_icons.png

Jed Ludlow

unread,
Jan 22, 2013, 3:18:23 PM1/22/13
to spyderlib
On Tue, Jan 22, 2013 at 12:40 PM, Sylvain Corlay <sylvain...@gmail.com> wrote:
Here is the kind of thing that I had in mind. 

Yes, I like that a lot. Can you point me to a source for those icons?

Sylvain Corlay

unread,
Jan 22, 2013, 3:35:16 PM1/22/13
to spyd...@googlegroups.com
The "play" icon comes from the same set of icons you linked to. (Look for "control".) I just made up the two others from your example. (you can use/modify it of course) S. 

Sylvain Corlay

unread,
Jan 22, 2013, 6:35:27 PM1/22/13
to spyd...@googlegroups.com
By the way, would it be possible to also have the classical "run" icon in the toolbar? 

Jed Ludlow

unread,
Jan 22, 2013, 7:02:30 PM1/22/13
to spyderlib
On Tue, Jan 22, 2013 at 4:35 PM, Sylvain Corlay <sylvain...@gmail.com> wrote:
By the way, would it be possible to also have the classical "run" icon in the toolbar? 


It would be possible. I'm wondering about duplication and clutter. There is a Run toolbar that already exists, and it has all the standard run commands as well as the debug launch command. I originally resisted the inclusion of the debug launch command into the debugging toolbar because of this, but I eventually gave in and added it. If there is enough support for including the standard run command into the debugging toolbar I guess I could be persuaded to include it.

Sylvain Corlay

unread,
Jan 31, 2013, 12:26:39 AM1/31/13
to spyd...@googlegroups.com
Indeed, it seems more logical then that the debug icon disappears from the run toolbar. 

Steve

unread,
Jan 31, 2013, 5:16:27 PM1/31/13
to spyd...@googlegroups.com
The new icons are much better!

Sylvain Corlay

unread,
Feb 4, 2013, 12:12:02 PM2/4/13
to spyd...@googlegroups.com
Hi Jed 
I am testing your last version and the debugging support in ipython consoles. 
In the case where there is a console connected to an external kernel, the toolbar does not work. The behavior that I experience is the following:

-If at least one other ipython console is active, one of them will get the signals from the toolbar. 
-If none is active, nothing will happen when one starts the debugging. Eventually, when using the "Debug Exit" button, an error will pop up with the traceback.

Thanks !

Thanks

Jed Ludlow

unread,
Feb 5, 2013, 12:15:02 AM2/5/13
to spyderlib
On Mon, Feb 4, 2013 at 10:12 AM, Sylvain Corlay <sylvain...@gmail.com> wrote:
Hi Jed 
I am testing your last version and the debugging support in ipython consoles. 
In the case where there is a console connected to an external kernel, the toolbar does not work. The behavior that I experience is the following:

-If at least one other ipython console is active, one of them will get the signals from the toolbar. 
-If none is active, nothing will happen when one starts the debugging. Eventually, when using the "Debug Exit" button, an error will pop up with the traceback.


Yes, this is a known limitation right now. From an IPython perspective, the debug toolbar really only works with Spyder-launched IPython kernels. There are two things driving this limitation today. The first is that the toolbar can't even launch the debugger into an external kernel because the "runfile" function is only available in kernels that Spyder creates. Carlos has created an issue report for this [1], and discussion on that front can continue there. The second issue is related but a bit more subtle. When you are debugging in a Spyder-controlled IPython kernel session on the surface it may look like you are sending debugging commands right into the IPython console front end widget. But behind the scenes Spyder is actually sending commands directly to the kernel through a different channel. When you attach an IPython front end widget to an external kernel you don't have access to that channel. That's going to take some more work. Please open up an issue on the project site so we can let everyone vote on priority through starring.

Sylvain Corlay

unread,
Feb 6, 2013, 11:34:00 AM2/6/13
to spyd...@googlegroups.com
Hi Jed, 
Thank you for the detailed answer. As you requested, I opened a new issue regarding the second point.
Reply all
Reply to author
Forward
0 new messages