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

dynamic breakpoint support #41

Open GentleCP opened 1 year ago

GentleCP commented 1 year ago

Hi, the recent version of idacode does not support adding breakpoints with vscode (F9), we have to add breakpoint() function in advance, which makes the debug process more complex. In previous versions of idacode, I remember it is feasible to add a breakpoint with vscode (F9) as long as one breakpoint() function has been added. Is it a bug that should be fixed or not? If not, is it possible to support adding a breakpoint with vscode?

image

ioncodes commented 1 year ago

You're right that one breakpoint() used to be enough to make it work. This seems to be odd, but I actually have not tested idacode with the latest IDA. Which version are you on currently? Perhaps there's some sort of incompatibility issue. If you're using an older IDA version I'd probably need more information.

GentleCP commented 1 year ago

The following text includes the environment I have used:

ioncodes commented 1 year ago

Hmm, the IDA version should be supported, however, it might be a Linux issue. I don't think we ever tested idacode on Linux and macOS. I can only come up with it being either a platform issue or that there's a quirk in the Linux version of IDA. I don't have a Linux copy of IDA so I can't really reproduce it on my side. Do you have a VM with the same issue that you might be able to share with me (you can remove the ida.key if that's an issue)?

Alternative idea that I came up with while writing this issue: There used to be a debugging bug with specific debugpy versions. I know that debugpy===1.0.0rc2 should have been stable at one point, can you try again with this specific version installed?

ioncodes commented 1 year ago

Did that solve your issue?

GentleCP commented 1 year ago

Sorry for forgetting to reply, well, I have tried debugpy===1.0.0rc2, however, when I connect ida with idacode, a new exception occurred as follows: image

GentleCP commented 1 year ago

I also have tried some old version of idacode (0.2.2) and debugpy (1.5.0, 1.6.5,1.2.0,1.1.0), unfortunately, none of them could solve the above issue.

ioncodes commented 1 year ago

I think that means we'd have to circle back to possibly setting up a VM to test this out, but I don't have a Linux license on hand...