ioncodes / idacode

An integration for IDA and VS Code which connects both to easily execute and debug IDAPython scripts.
725 stars 77 forks source link

Debugger is not working. #33

Closed maskelihileci closed 2 years ago

maskelihileci commented 2 years ago

I struggled for hours and couldn't find a solution. I hope I get a response soon, I need it for an urgent project, sorry

debugpy.server-1948.log debugpy.adapter-9236.log .

ioncodes commented 2 years ago

Can you send me the exact steps you have taken to attach the debugger and can you let me know which IDA version you're using?

maskelihileci commented 2 years ago

IDA PRO 7.6 SP1

  1. I enable IDA CODE from Ida plugins and I get response like this. "[IDACode] Listening on 127.0.0.1:2075"
  2. Using the ctrl+shift+p shortcut from the software Visual Studio Code "IDACode": Connect and attach a debugger to IDA"
  3. Then it asks me about the project I'm working on, and I press enter.

" [IDACode] Logging to C:\Users\You\AppData\Local\Temp with pattern debugpy.*.log [IDACode] IDACode debug server listening on 127.0.0.1:2076"

  1. Then I write "breakpoint()" in the line of code that I am sure is working.
  2. Using the ctrl+shift+p shortcut from the software Visual Studio Code "IDACODE: Execute script in IDA"

Final : After doing all these operations, any debugger does not work, and when I look at the logs, I understand more clearly that it is not working.

Note : The code is executable only the debugger is not working.

maskelihileci commented 2 years ago

image

Also, I'm ignoring this error, I don't know if I'm doing it right.

In addition, the IDA CODE plugin I use causes a "memory leak" problem in IDA software. After leaving it open in the background for a long time, windows crashed, when I examined the error reports, I saw a memory swell of 115 GB.

Then I realized that after a few minutes of activating the ID Code plugin, the private bytes start to increase non-stop. I checked this with process hacker software.

ioncodes commented 2 years ago

The memory leak thingy I used to have as well (not always IIRC). That error shouldn't be ignored, it may actually be the reason why it's not working for you. To debug a script (or run it even if memory doesn't fail me) you need to open the folder that your script resides in.

maskelihileci commented 2 years ago

The memory leak thingy I used to have as well (not always IIRC). That error shouldn't be ignored, it may actually be the reason why it's not working for you. To debug a script (or run it even if memory doesn't fail me) you need to open the folder that your script resides in.

Just like you said, the debugger didn't work because I didn't open a folder. I am very happy now that I have solved the problem.

I think you should specify that you need to create a folder in the topic. There may be people who get errors like me.