Getting frame variables from Python Runtime - pycharm - performance

After updating to PyCharm 2019. my programs run incredibly slowly and with every command in the python console I can see a background task running "getting frame variables from python runtime".
This was not happening in the older version of the IDE and it has made my programs incredibly slow. Any pointers on whats happening and how I can resolve this?

Make sure uncheck the box indicated:

Related

Extendscript Toolkit debugger fails: Can't start debug session

Not a programming problem per se, but rather a programming environment problem that I have been unable to find a solution to.
The problem relates to Adobe's Extendscript Toolkit (both 3.5 and 4), but so far I haven't been able to solve the problem, so here I am...
The error I get has appeared more or less over night. I didn't experience this problem yesterday, nor this morning. But exactly WHAT has happened is beyond me. I have removed preferences, I have uninstalled, reinstalled, created a new user, restored old preferences from Time Machine and I'm now pretty much lost for options.
Basically, nothing works in ESTK anymore. Just opening ESTK and entering alert('Hello') won't work. Neither will $.writeln(). Everything running from within ESTK seems to give the same error;
Cannot execute script in target engine 'main'
With details:
Cannot execute script in target engine 'main'!
(#1116) Can't start debug session.
Below is a screenshot taken from the new user I created to test, same problem.
The "funny" thing is that all the scripts (InDesign CS5, still hanging on to it for reasons) still work perfectly in the applications' script panels. So there is nothing wrong with the scripts (heck, they haven't changed one bit, and still refuses to run in ESTK).
As mentioned, I've tried installing the ESTK CC (version 4) as well, but the very same problem occurs there. Which leads me to think the problem lies somewhere else, but I do not know where, and why.
So, if anyone can shed any light on this issue, at all, I would be very happy. Debugging is basically the only thing ESTK is good for in my book, but now that even that functionality is gone, I don't know how to efficiently debug the scripts which is kind of hampering the workflow.
For reference, I'm running InDesign CS5 (from the old Creative Suite) on a 2008 Mac Pro with 10.11.6 (El Capitan) installed. Well aware that it's pretty out of date, but that is beside the point here.
In the above mentioned forum, Adobe has published a stable workaround!You just have to correct a setting inside the estk application:
Open the file(Mac): “/Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/SharedSupport/Required/cdic/11BTBackend.jsx”
Search for the value: 604800000 (line reads bt.timeout = 604800000)
Replace that value with 604800 and save
Quit ExtendScript Toolkit and relaunch.
I can confirm that it works.
From the adobe Forum :
"we have found a first workaround: just change your date to any date before 20-nov-2018"
https://forums.adobe.com/message/10761440#10761440
Seems like a date issue :(
I just published a quick update about this on the Adobe Tech Blog.
For the time being, if you dismiss the dialog, you can still run your script via ESTK and step through code as usual.
Alternatively, if you really want to avoid the dialogs, and you don’t mind setting your clock back, you can sidestep the issue by setting your system clock back to November 19, 2018 or before. On most systems, changing the system time can have unintended side effects, so this isn’t recommended unless you’re really certain about it.

PDB debugger stability questions

I am using either pdb or ipdb for debugging my python code. However whenever I am using set_trace() I can typically run a handful of lines of code to test but it eventually freezes while I am typing. I kill the python process and have to re-run the entire process from the start - which usually kills about 5-10 minutes of data processing time to get back to where I was.
I am using an anaconda build with python 2.7.
The only anomaly I have is that I needed to run
conda install -c conda-forge psycopg2=2.6.2 in order to be able to use psycopg2. I have been ignoring it for the last two months but realize that it isn't an acceptable work flow.
Any thoughts to help resolve would be appreciated.
Resolved it.
I still don't know why this behavior is happening but if I press caps lock twice while it is frozen - it unlocks the set_trace. Don't ask me why but it works.

Debug with mono d

I'm trying to use mono d to develop some vibe.d applications and I'm having trouble with the debugger. Sometimes I can't see the content of some variables. Also, in order to have any symbols at all, I need to remove my complete "buildTypes" configuration in my dub.json.
Also, when starting a debug session, I get this:
"&"warning: GDB: Failed to set controlling terminal: Operation not permited\n""
Finally, I cannot stop my application using the mono d "stop" command. I always need to use the kill -9 on my application or else it keeps running.
Any idea how to solve these issues?
In general I'm struggling to find a confortable working environment. Tried Visual Studio+VisualD, Eclipse+DDT, and Monodevelop+Mono-D, but all have their issues, almost always related to debugging. What is everyone else using?
Thanks a lot,
Mario
GBD based debugging is not that good in Mono-D. Eclipse can understand more of D constructs by my opinion, but the best option there is to use VisualD w/ Mago. Unfortunatelly current version of Mago makes VS 2013 very unstable.
Could you please put there your failing dub.json configuration?
I'm assuming you are using an Ubuntu with a recent version of GDB. You can ignore this warning, it's beacuse of some GDB 7.x vs GNOME terminal thing, I'm sure that will be fixed soon. As a workaround you can use Mono's integrated terminal for debugging.
I ain't have this "stop" issue. Which version of Monodevelop and Mono-D are you using? It is advised to use a recent beta instead of the stable release, I'm using Monodevelop 5.6 right now without any issues.
I think Mono-D + Linux is by far the best option that you could have for D development right now despite it's issues.

phantomjs exit() doesn't terminate the process

I've been using phantom.js on Windows 7 for quite some time now (I think v1.4.0 was the first version I used) and everything was always fine. But for some reason the process isn't properly terminated any longer when calling phantom.exit() and I absolutely don't know why.
The problem started to occur in v1.7.0, from one day to another. Everything once worked fine in 1.7.0 but then it did no more. Even after upgrading to 1.8.0 and now 1.9.0 it still doesnt work. The console just hangs. I can't type anything, phantomjs.exe is still listed in the list of processes in the taskmanager, even CTRL+C doesn't do anything. The whole thing is just frozen.
The underscore in the console blinks as if it expected more input but I can't type anything. The only chance I have is to close the cmd window using the [X] button which is totally dumb for automated testing.
I use the precompiled binaries I downloaded from http://phantomjs.org/ and as I said: it stopped working from one day to another. I even reinstalled it a few times, even to different folders but the process just doesn't get terminated any longer. Anyone who has an idea what the problem could be?
This is a known issue with the Nvidia drivers when you have two cards.
To resolve this issue you need to select "High-performance NVidia processor" in the NVidia control panel (NVidia Control Panel > Manage 3D Settings > Global Settings).
Read more here: https://github.com/ariya/phantomjs/issues/10845

Graphical debugger for bash

Is it there any graphical debugger for bash on mac os x or linux? I mean something in the same fashion that the debugging mode of Visual Studio or Eclipse, where one can stop the program hover the mouse pointer over variables and get instantly values, modify them and go backwards and try modifications without the need to start the program fomr the beginning. I am talking about very long bash scripts
for debugging execute your script with:
bash -x <scriptname>
gui debugger:
http://bashdb.sourceforge.net/
Debugger for Bash version 3(Bourne again shell). Plugin for Eclipse. Will only work with shell script editor ShellEd.
http://sourceforge.net/projects/basheclipse/
I have found the vscode-bash-debug
extension (https://github.com/rogalmic/vscode-bash-debug) for the visual studio code editor (https://code.visualstudio.com/) very useful.
I haven't come across a visual debugger, but bashdb works quite well for debugging. You can set breakpoints, continue, print variables etc..
https://sourceforge.net/projects/bashdb/
Install via your distro's repositories. There is a quick-start guide here:
http://www.rodericksmith.plus.com/outlines/manuals/bashdbOutline.html
(first chapter takes only half an hour to read/try).

Resources