I am using PyCharm as Python IDE and debugging tool. Just upgraded to 2020.1.2.
Occasionally, while stepping over in debugger, it skips a line in a function which normally should be executed. I tried to a lot of fix it, like re-editing the function, format the code etc., without any luck. Only one route that is promising is to define another function as proxy only to call this problematic function, but this is really what I am not going to do because that makes the code so clumsy. If I copy this function into another new .py file and debugging stepping over it, it can be quite normal. I have got no clue what goes wrong except the chances are PyCharm has a bug.
Anybody same with me? Any solutions? thanks!
It might be related to this issue.
Try adding this environment variable to your run configuration:
PYDEVD_USE_CYTHON=NO
Related
I have a single project in VSCode where breakpoints are not working and I can't figure out why. I'm new to VSCode but I've got them to work in other projects (Pascal) but there's something about this one it doesn't like.
Does anyone at least know what this means when the break points are gray like this? Is it a bug? In the 2nd screenshot you can see I can run LLDB from the terminal on the same executable so it's not LLDB messing up.
This might be an obvious answer, but it's what solved the issue for me when I encountered it.
Recompile the program and try again
As I am learning Elixir/Phoenix, I happen to run into an issue like this often.
The problem is that this comes from a dependency, so normally I do this:
open deps/something/.../thefile.ex
add some debug code like IO.inspect to see what params are being passed
stop server, recompile with mix deps.recompile something
check the documentation to see what types are expected to that function
compare the types and trace down the problem to my code
This works but I'd like to improve my process, I know I can use Iex to start a repl, but I'd like to get much faster in terms of:
having a repl inside of the error page itself started automatically (like in better_errors gem for Rails)
having a way to see what arguments went into that method without me digging around (could be solved by the former point)
being able to see a method's documentation quickly
Also any other tips are greatly appreciated.
Please open up an issue in Plug: https://github.com/elixir-lang/plug
You have some great suggestions, like accessing the docs and make the arguments explicit. I don't think we can provide a REPL at the place of error though.
EDIT 1: I went ahead and opened an issue here since I got excited about those improvements! :D
EDIT 2: I realize that I should probably have used a comment as this is not quite an answer (yet!)
I have an R script that doesn't throw what I expect it to. However, it does run all the way through. To fix it, I've tried setting a breakpoint in order to enter debug mode.
But when I do this, I get an error that says:
debugSource('~/mycode/konfio/Projects/Interest Rates/src/getPARS.R', echo=TRUE)
Error in if (length(funBody[[idx]]) != length(originalFunBody[[idx]]) || :
missing value where TRUE/FALSE needed
I've Googled this error, but only found one link which didn't help. If anyone knows how to get my hands on the Debugger, or somewhere else that I can search for the problem I'll be grateful.
Thank you.
RStudio's breakpoints work by rewriting your function to include debug code. The most likely cause of this problem is a bug in RStudio that's causing it to fail to rewrite your function. There are a few possible solutions:
Remove just the statements you want to debug and put them into a separate function. Set the breakpoint on that function and call it from your main script.
Use browser() based-debugging: just add browser() where you would have set a breakpoint (RStudio's debugger works with R debugging features, too).
Use a newer version of RStudio. Debugging R scripts (as opposed to functions) has improved a lot lately, and if you're feeling especially brave you can try a daily build.
If you have time, please post the contents of the file you're having trouble with to RStudio's support forum; we'd like to take a look and see if we can make a fix in an upcoming version.
Sorry if I'm a bit of a noob when it comes to this sort of stuff, but thanks anyway.
Basically I've managed to install QT4.7 properly and it works and compiles stuff. (I'm using it conjunction with vs2010). However, I wanted to try something that requires libqxt. Unfortunately this seems to be the only installation guide out there. And I'm really not getting it. It mentions this little bit:
"configuration
Make sure qmake is in your PATH and run"
I think this is where I'm getting tripped up. Is this the qmake the same one I used for QT4.7? (If this is the case I shouldn't have to change anything right? It ought to look like this: "c:\Qt\4.7\bin". Which is added by going to >
Control Panel|System|Advanced|Environment variables menu. And which is already there from installing qt4.7)
Or is there a new qmake for libqxt somewhere? Am I understanding the term PATH incorrectly?
In any case right now clicking on configure.bat just echoes back "searching" and then closes before I can read what else it says. Would I be better off just opening a cmd prompt and cd'ing to the libqxt directory and running the configure file from there?
If anyone knows of an alternate install libqxt tutorial somewhere that'd probably helpful to me as well. Thanks to anyone who can take a minute to point me in the right direction.
I've tried to use MonoDevelop 2.4 and 2.6 with Ubuntu 11.04, but neither of them seems to actually provide any way of running the project. (As the picture shows, the Run, Step, and Debug items are disabled -- both on the toolbar and inside the menus.)
This is true for all project types I've seen so far -- C#, Python, etc...
But mono-debugger is installed. Is there some post-setup task that I need to do manually, for this to work?
Looking over https://github.com/mono/monodevelop/blob/master/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
Perhaps you haven't selected a 'Project'? Open up the Solution pad and click on the Test1 project (not the solution at the root of the tree, but the project just below it).
I'm just guessing here since I don't have Ubuntu and can't actually test anything.
Edit: actually, it looks like clicking on the Solution would work as well.
From looking at the code, another possibility is that you don't have a build target? Not sure how that would happen, but unless you only opened Main.cs and not actually Test1.sln, I don't know what to suggest.
When you opened the project, which file did you open? Test1.sln? Test1.csproj? Or Main.cs?
Try looking for mono-mdb and more packages in synaptic, this may fix this issue.
Don't remember exact names, Linux box at home...
Did you really open the project? It looks like you just opened Main.cs. It won't work that way.
Make sure you installed the compilers (mcs etc)