I am using a mac, with Pycharm version 2018.2.4 Community version.
When I run a debugging session using the debugger and hit a debug point, I have to click on my editor using my mouse to be able to type code on the editor. If I don't do this and hit my keyboard directly, Mac will complain with some "bing" sound, signaling the keyboard input is not valid to any application (my opinion).
How to make my Pycharm auto focus on the editor when hitting the debug point? Or at least focus on the debugger so that I can hit ESC to focus on the editor?
I have selected "Focus application on breakpoint" in the setting.
This is how it should work:
In Preferences, type Focus application on breakpoint into the search bar and be sure it is toggled on.
Apply that setting and exit Preferences.
In your debugger, when you hit a breakpoint, hit the escape key, and your cursor should be blinking in your editor.
For me, I had to disable the setting, apply, re-enable the setting and re-apply once more.
It now behaves as stated above.
There is a bug reported on PyCharm for the same. Here is the link to the issue. The bug is reported for version 2018.2 and still not fixed.
Related
I run my script in Spyder. It finds an error. I click the Stop button. Spyder will open the underlying python file that caused the error. How do I stop this from happening?
I have gone through the settings and google, but I cannot find out how to stop this.
What I want is when there is an error, I click the stop button, nothing further happens other than the code has exited debug mode.
You could disable that behavior by changing Run preferences:
Tools->Preferences
On left menu choose “Run” then locate “General settings” section then uncheck "Directly enter debugging when errors appear."
Apply
:)
I need to get rid of these constant popups in Spyder. They are so frustrating to me. They constantly get in the way of what I am typing, and I can't see the code. I unchecked everything in Tools-Preferences-Linting.
(Spyder maintainer here) The options in "Completion and linting" only work for the Editor. Since you want to disable those hints for the Console, you need to go to
Tools > Preferences > IPython console > Display
and deactivate the option called Show calltips.
Im using PyCharm on MacBook Pro(OS: macOS Mojave). After updating to the new PyCharm version(Version: 2019.1.3), now tool bar is not visible when PyCharm IDE in full screen mode. Is there any solution for this?
Thank you!
It looks like you're running in Full Screen mode. On Windows, the key to switch is F11, on macOS it's N/A according to here: https://www.jetbrains.com/help/pycharm/ide-viewing-modes.html?section=Windows%20or%20Linux
I think that's a documentation error, but I'm sure you can find the appropriate key somewhere in the settings.
You indicated you were indeed running full screen, but the toolbar never displays in full screen, for any project, while it does display in non-full screen. Submitting a bug report here https://youtrack.jetbrains.com/oauth?state=%2Fissues%2FPY (with screen shot and good info on your setup) is likely to quickly get you more information - or the confirmation that this is a bug and hopefully a quick fix.
To exit the full screen mode, choose View | Exit Full Screen on the main menu.The main toolbar contains buttons that duplicate the essential commands for quicker access.
By default, the main toolbar is hidden. To display it, select View | Toolbar on the main menu.
Thanks for the quick reply people. today I updated PyCharm to it's newest version(2019.2) and this bug wasn't there.
I have the same issue on my mac, when projects are opened in fullscreen (at startup) the topbar is "cutted away". You can see that there still is a small line where the run configuration is, so it's not on purpose. What I usually do is leaving fullscreen and reentering it, the issue is fixed.
I am positive the issue is related to fullscreen startup of the IDE.
I have a problem with PyCharm v2.7.
it does not show me errors.
I have configured it to show them as here
but nothing.
here a screenshot of what I see (no error displayed)
if I run code analysis it shows the errors marked as INVALID in the window but it does not highlight the code.
any idea?
I had this issue recently on PyCharm 2020.3.3 Community Edition.
What I've found is in the top right corner of the editor there is a Reader Mode button.
If you click it you turn the Reader Mode off and then you can see your errors.
You can re-enable it by clicking the book icon
I found. i've enabled by chance the "power safe mode" that avoid error checking. it can be re-enabled by clicking on the little man on bottom right corner.
In my case, I had some ticks disabled in the Python Inspections menu in Settings > Editor > Inspections > Python. I have ticked everything and applied, and now it is working.
I don't really understand why this happened as the problem arose from one day to another. I had even re-installed the whole PyCharm, trying older versions, and deleted the .pycharm configuration folder from home.
I had the same issue with PyCharm Community Edition, v.2016.3.2. To fix,
go to Preferences... from the PyCharm menu, and open Editor/Colors & Fonts/General
Now go to Errors and Warnings/Error under your current schema.
I also had to set my Project Interpreter under Preferences/Project:<name>/Project Interpreter.
See screenshot.
None of the previous answers worked for me when I ran into this issue, but I was able to fix it by doing a hard reset on my PyCharm settings:
From the main menu, select File | Manage IDE Settings | Restore Default Settings.
You will lose all your custom settings this way of course, but this was the only thing that worked for me.
I have tried many things, but only Invalidate Caches did the trick, after that I could hover the green arrow (top right side) and change Highlight to All Problems
I needed to "Add content root" under "Project Structure" in Preferences. I had no content root.
Nothing of this worked for me.
My problem was a single warning: "unreachable code" which blocked all errors from being highlighted.
I removed this line of code (+ the warning) and all errors showed up again.
For me, this problem was a symptom of having created the file in the wrong place without realising. Before taking any drastic actions, check your project structure
I just installed Python Tools with Visual Studio 2013 (Shell) and whenever I run a debug of the program, a separate window pops up for the interpreter:
I can however run the program using the internal interactive console:
However this doesn't seem to stop at any breakpoints that I set in the code. Is there a way to force the system to use the internal console for debugging instead of using a separate windowed console?
You can hide the shell by changing Environment options in Python Tools with Visual Studio, change the default path to point pythonw.exe.
Here is the steps:
TOOLS -> Python tools -> Python Environment
Open Environment options, Add Environment, Enter whatever you want to name it.
Copy all the options in the default Environment except change "Path:" to path of pythonw.exe. Hit OK and made the new Environment as the default environment.
There's no way to hide the console window entirely, but all output from it should be tee'd to Output window, so you can use that if you don't like the console.
There's also a Debug Interactive window (Debug -> Windows -> Python Debug Interactive) that you may find of help, if what you want specifically is being able to stop at breakpoints and then work with variables etc in a REPL environment. Once enabled, this window will provide you a live REPL of the debugged process, and when you're stopped anywhere, you can interact with it. Like Output window, it does not suppress the regular console window, but it mirrors its output.
Although this seems old, solution pasted elsewhere can help someone searching an answer.
I cannot comment since I don't have rep.
Here is the solution: https://stackoverflow.com/a/22486749/4809808
As far as the console window it will generally open unless you mark your app as a Windows application in project properties (this will launch pythonw.exe which doesn't include a console window).
If you right click on your project and choose Properties in the "General" tab there's a "Windows Application" checkbox below Working Directory.