PyCharm: can't get input() from keyboard while debugging / stepping through - debugging

I can't figure out how to input from my keyboard while debugging the program. The only place I can write something is on 'Console', but when I do, a message pop ups saying "Pause the process to use comand-line".
It's been hours, I couldn't find a solution to this. Thanks in advance.
When running the program all works fine, I can write the input normally.
But when debugging, I get stuck when program reaches "input()" line.

Here's link that should solve your problem. The issue is that your debugger is defaulting to the python console.
PyCharm: How to debug `raw_input()` input from keyboard?

Related

Why does the Spyder debugger seem totally unresponsive?

I'm new to trying out Spyder, and attempting to debug. I'm very familiar with Matlab's debugging, which Spyder's appears similar to.
Unfortunately, when I enter debug mode, the debug menu buttons and hotkeys are unresponsive; nothing happens when I click or type them. I have no idea where to start to resolve this. I can start the debugger, which opens the ipdb console, without issue. But then it's totally unresponsive to anything other than literally typing into the ipdb console (e.g., 'quit', or define variables [which does work])
Does anyone have any suggestions? Or is there followup information that could be helpful? Thanks in advance!
In case this is useful to anyone in the future, this was solved with a full un-install / re-install of anaconda. I don't know what the original problem was.

x64dbg cannot open an exe file (but can attach it), why?

If I try to start debugging through the command "Open" of x64dbg, debugging stops without ever starting and a series of missing DLL errors are shown on the screen.
If I just open the program from WIN and THEN I use the attach command by selecting the process, debugging works.
Unfortunately I wanna "investigate" from the moment the program starts and not when it is already started.
How can I solve it ?
You need some anti-anti-debugging plugins (such as ScyllaHide) for x64dbg mentioned in this page to counter anti-debugging attempts and do some patching if needed:
https://github.com/x64dbg/x64dbg/wiki/Plugins

ZeroBrane IDE - "run to cursor" (Ctrl+Shift+F10) mode *sometimes* not working during debug

I use ZeroBrane studio (ZBstudio) for debugging Lua code when working with the Torch framework.
A weird issue occurs at times. When debugging, sometimes I want to run the code all the way until it encounters a breakpoint. This specific mode does not work at times (sometimes it does, sometimes it doesn't; I can't figure out why).
When it doesn't work, nothing happens when I press the relevant button in the GUI (or Ctrl+Shift+F10). I can go line-by-line (Shift+F10) when this happens, the line-by-line mode is not affected.
Sometimes when this happend, restarting the ZeroBrane IDE program fixed it, other times it remains persistant.
Not sure if anyone else encountered this strange behaviour. Thanks in any case.

How can I know because myapplication crash?

Where XCode generate error for application crash ?
I'm crazyng ! My application when open second file xib with webview then it crash. But I don't know why ? how can i Know where is error ?
You need to learn how to use the debugger in Xcode.
Run your app under the debugger then instead if simply getting a stack trace Xcode will stop at the line the fault occurs and show you your code and variables. You can then examine the contents of your variables, the call tree, etc. and hunt down the problem.
Once you know the general area of the problem you can place breakpoints to pause your application before the problem occurs and check whether your variables have the values expected etc. Then you can run till the next breakpoint, or step through your code a line at a time.
You can add code, such as NSAssert's and NSLog's to your app to check progress and display information without stopping the run, etc.
It's a process, and some problems will be harder to track down, but you'll get quicker at it with practice.
The Xcode documentation will tell you all about the debugger.
HTH

How to find source of print() or NSLog() console output in Xcode

I'm not sure if this is possible. Here is an example situation:
Something is printing to my console and I don't know where it is coming from in the code. I did a quick search using the Finder in Xcode on terms such as 'NSLog' and 'print'. Nothing relevant came up.
Is there any quick way that Xcode has of finding where the source of the output is coming from ?
Kind of like when you right click on a method and you have all the options of exploring different parts of the code associated with that method.
Also: are there other functions that print besides NSLog and print?
Thanks so much!
Try running in the debugger, with breakpoints set on printf, NSLog, etc. When you hit a breakpoint do a backtrace (bt) to see where it's being called from
There's a plugin LinkedLog for that. You replace all NSLogs with LLogs and then will be able to just tap on link in Xcode's console to get to the line caused it to appear.
Didn't try it myself, but definitely will.

Resources