PyCharm does not up-front Debugger window on breakpoint hit

Answered

I have upgraded from PyCharm 2017.3 under Ubuntu 17.04/10 to PyCharm 2018.2 under Ubuntu 18.04.

Running my app from the Debugger (i.e. not attaching to a running process, if it makes any difference), on the old system, when I hit a breakpoint the debugger window correctly became "up-fronted" on the breakpoint lint.  (At least sometimes/most times it did; occasionally PyCharm seemed a touch flaky about this.)  Under the new system, the debugger window always remains behind the application window.  The application window is provided via Qt/PyQt, though that should not matter.

Following a PyCharm post/bug report I found elsewhere, I have tried altering:

File > Settings > Build, Execution,Deployment > Debugger Page

to try switching Focus application on breakpoint off, and also Show debug window on breakpoint off too.  neither of these has altered the behaviour.

I would have thought it is the Show debug window on breakpoint setting which is at issue.  I find neither on nor off makes any difference?

20 comments

Hi,

Please upload a screenshot showing the problem and idea.log (Help | Show Log in...) after reproducing to https://uploads.services.jetbrains.com/ zipped and let me know the name of that zip file.

0

@Sergey Karpov

Thank you for your interest.

You really want a screenshot which shows my application window still on top of PyCharm window (which is at back and obscured) when execution causes a breakpoint to be hit in the debugger?  I cannot imagine that will show you anything than exactly what I am saying, viz. unlike before upgrade, the debugger no longer up-fronts itself when a breakpoint is hit, despite the PyCharm Debugger setting of Show debug window on breakpoint which I have said i have played with on/off.  What else is there to show/say?

0

Please upload idea.log (Help | Show Log in...) after reproducing the problem to https://uploads.services.jetbrains.com/ zipped and let me know the name of that zip file.

0

@Sergey Karpov

I have uploaded

File uploaded: debugwindow.zip

.

It contains a snap of what I see, a shot of the settings which I have tried turning on/off to no avail, and the idea.log of the session I was in.

Thank you for taking a look.  If you need me to run again to get a better log please let me know.

P.S.

Remember, it used to work (fairly!) fine, as per above.  I do not know what the UI for PyCharm is written using, but bear in mind that at Ubuntu 17 we used to use the Unity desktop while at Ubuntu it is now GNOME 2.  If you have to interact with that, I don't know whether it might have different calls/behaviour for up-fronting windows which might affect PyCharm debugging sessions?

P.P.S.

As to what I said about the Debug Settings checkboxes possibly being "the wrong way round", that came from https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000399379-Debugger-setting-to-focus-application-on-breakpoint-is-a-wrong-way-round and https://youtrack.jetbrains.com/issue/IDEA-198293 . However, I think they were referring to the "Focus application" rather than the "Show debug window" on breakpoint.  In any case, I claim to have tried both without altering behaviour, unless you know better...

0

This is actually really looks like https://youtrack.jetbrains.com/issue/IDEA-198293, please leave a comment, vote and follow for updates. 

0

@Sergey

But I already wrote in my previous post:

https://youtrack.jetbrains.com/issue/IDEA-198293 . However, I think they were referring to the "Focus application" rather than the "Show debug window" on breakpoint.  In any case, I claim to have tried both without altering behaviour, unless you know better...

So I don't think that's my issue, and the "workaround" there does nothing for me as I said.

Do you basically mean I should raise this whole issue on that jetbrains tracker site, I won't get an answer here?  Thank you.

 

0

I have discussed it with the developer and it seams that this is the same issue despite the fact in your case it is "Focus application".

0

@Sergey Karpov

Thank you very much for taking the time to check up on this for me.

> and it seams that this is the same issue despite the fact in your case it is "Focus application".

I think you mean that in my case it is not "Focus application" but "Show debug window", right?

In any case, the post which says the "workaround" is to uncheck the checkbox(es) seems to have no effect for me, if it was supposed to solve.  This leaves me in the situation where, given that my app window is large and obscures the PyCharm window, when I hit a breakpoint I have absolutely no idea that I have done so and just continue trying to interact with the app.  Which is extremely frustrating!

One solution seems to be https://youtrack.jetbrains.com/issue/IDEA-198293#focus=streamItem-27-3054392-0-0 :

> 1. jbre (update 152 build 1331) installed with https://plugins.jetbrains.com/plugin/9195-jb-sdk-bintray-downloader plugin
> 2. suppress.foucs.stealing registry key is disabled

I don't mind trying this out, but since I'm Linux I have absolutely no idea what to do about a "registry key"?

Otherwise, are you/they saying that basically I should wait for the next PyCharm update and it will be fixed?  Do you have any idea when that will be released?

My thanks in advance for your kind attention.

0

>I think you mean that in my case it is not "Focus application" but "Show debug window", right?

Correct.

>In any case, the post which says the "workaround" is to uncheck the checkbox(es) seems to have no effect for me, if it was supposed to solve.

This may actually happen, because the environment can differ. Please feel free to comment on the issue about it and check with developer if there is another possible workaround.

>I don't mind trying this out, but since I'm Linux I have absolutely no idea what to do about a "registry key"?

Please go to Settings | Keymap, search for Registry and assign some shortcut. After that close settings dialogue and hit this shortcut. There you will be able to find suppress.foucs.stealing.

>Otherwise, are you/they saying that basically I should wait for the next PyCharm update and it will be fixed?  Do you have any idea when that will be released?

I am not sure that it will be fixed in the next release because it is in Open state. When it is marked as Fixed, then it will also have a Fix versions which means that the problem should be fixed in this particular version.

0

@Sergey Karpov

Thank you again.  I have a lot to look at between this one and my other post (about snap/XDG_RUNTIME_DIRS).  I will return and add a post on each one when I have time to deal with them.

0

I have posted at https://youtrack.jetbrains.com/issue/IDEA-198293#focus=streamItem-27-3130492-0-0.

If anyone comes across this issue and would like to "up-vote" to impress upon PyCharm the urgency of this issue, please do so there!

0

I believe I am having the same issue: on breakpoint hit, PyCharm does not raise its window to the top. I tried toggling the setting described, to no effect:

I should also clarify some things about my environment:

  • Unlike the OP, I am running Kubuntu 18.04 (i.e. the KDE flavour of Ubuntu)
  • I am running X-Windows remotely (i.e. PyCharm is running on my development server, and X-Windows is running the display locally on my laptop over the "ssh -X" tunnel).
0

@Srhaque

I believe you should look at my latest post at https://youtrack.jetbrains.com/issue/IDEA-198293#focus=streamItem-27-3139986-0-0.  Does that apply to your Kubuntu 18.04?  Basically the whole thing is a nightmare: I have had to downgrade my PyCharm from 2018.2 to 2018.1 *and* install & activate the "NoAnnoyance" GNOME add-in to get back to a working system like I used to have.  Let us know whether that does anything for you?

0

@jnbarchan

I'm not using Gnome (I forgot to mention that in my original comment, I have edited it to clarify that).

0

@Srhaque

Hmm.  Assuming it would only take you 5 minutes to install & test, do you want to see whether PyCharm 2018.1.x does at least work for you?

0

Yes,it definitely worked in 2018.1.x.

0

Just my 2 cents: I am on Ubuntu 18.04.1, PyCharm 2018.3.4 Community Edition,
auto focus on breakpoints was not working anymore since some older version (maybe 2018.1)
but unchecking suppress.focus.stealing did the trick now.

EDIT
Focus application on breakpoints is checked (it always has been).

0

@Antoniomignolli

Thank you for posting!  I have since stuck on the 2018.1 and taken no updates because of this bug.  In view of what you are saying I ought now to try with 2018.3.4, as I would like to move to a newer version, but I am loathe to do so as if like before it doesn't work for me I have to go through the hassle of downgrading all over again....

0

Don't be too enthusiastic ;)
Sadly and strangely enough, it does not appear to work every time!
It worked a couple of times, then nothing again.
This makes no sense.

I use Notifications too, because of non-working focus,
but same behaviour, sometimes they work, sometimes not.

0

Yeah, thanks again for the heads-up.  Just what I don't want to do is to move to newer version and then find it isn't reliable!  If you feel like it/remember, please come back here at a later date if you feel you can then post that it really does work!

0

Please sign in to leave a comment.