views:

56

answers:

3

I think i'm missing the elephant in the room but for the life of me i can't find the keyboard shortcut to setting a breakpoint in eclipse when using the pydev plugin.

Things that i've already tried:

  1. Ctrl-Shift-B: does nothing.

  2. Ctrl-F10: brings up the breakpoint context menu where you can select to add breakpoint, remove etc... i don't want to have to scroll through a menu every time i want to use a keyboard shortcut.. .kinda defeats the purpose of a shortcut.

  3. Clicking on the strip on the left hand side of the code: this is the only way that i'm setting it atm, but i'm rather avoid using the mouse if i can.

I'm using pydev 1.6.1 on eclipse 3.6

EDIT (31/08): In light of the two answers by codedevour and Tao, I've tried editing the shortcut but have had no luck with the new shortcut Ctrl+Shft+Alt+B either. Other shortcuts work. I've also tried changing the "When" drop down from In Windows to 'Pydev editor scope' with no effects. From what the editor is telling me, there is no conflicts with the breakpoint shortcut.

This is a fresh install on two machines, both windows 7 and it's happened on both machines.

+2  A: 

Ctrl-Shift-B works for me and I am using pydev 1.6.1 with eclipse 3.6.

Perhaps, you have a conflict with another program? Try change it under preference -> general -> key -> toggle breakpoint to another keyboard shortcut.

Tao
I've changed it to Ctrl+Alt+Shift+B but it still doesn't work... other shortcuts work.I'm using the same versions on two windows 7 OSes, which OS are you using? Maybe that matters...
Joe
I am using Windows 7. I went back to look at my Eclipse version. I was actually using 3.5.2 for python development ... (Build id: 20100218-1602). I am sorry for the confusion. I keep several eclipse install at the same time and got mixed up.
Tao
i tried installing eclipse 2.5.2 with my pydev but still no luck.I've found a working shortcut and replaced it's binding with the toggle breakpoint binding but still no luck. pydev only added the functionality in 1.5.8, it may still be unstable. At my wits end.
Joe
+2  A: 

Ctrl + Shift + B

If this refuses to work, have a look at Window > Preferences > General > Keys and look for overlayed keys which may shadow this shortcut.

codedevour
+2  A: 

Finally found it!

The answer is here: http://www.mail-archive.com/[email protected]/msg04234.html

In short, shortcuts are not set for all perspectives of eclipse. Whilst in the pydev perspective, go to Window -> Customize perspective -> Command Groups Availability -> Check breakpoints.

That's it!

I was using the pydev perspective (which is what it switches to when you first create a pydev project) however, breakpoint shortcuts are only available in the debug perspective by default so you need to turn the shortcut on... wow that was so NOT obvious!

Joe