Open puppywang opened 4 years ago
To break in the code make sure to call breakpoint
before you attempt to break on VS Code's "dots". https://github.com/ioncodes/idacode#debugging
I'll close this for now, if there's still an issue feel free to reopen the issue!
To break in the code make sure to call
breakpoint
before you attempt to break on VS Code's "dots". https://github.com/ioncodes/idacode#debugging
@ioncodes I did add breakpoint first, and then create dot breakpoint on VSC, but those breakpoint turn gray immediately, I found that I can set breakpoint outside call to execfile, but not the code inside execfile. I am using python 2.7 shipped with IDA 7.0, I attach the debugpy log, thanks.
Are you debugging an IDA plugin? Can you show me parts of the source code?
From the adapter logs:
Client[1] <-- {
"seq": 6,
"type": "response",
"request_seq": 3,
"success": true,
"command": "setBreakpoints",
"body": {
"breakpoints": [
{
"source": {
"path": "D:\\idacode\\objc2_xrefs_helper.py",
"name": "d:\\idacode\\objc2_xrefs_helper.py",
"sourceReference": 1
},
"message": "Breakpoint in file that does not exist.",
"verified": false,
"line": 568
}
]
}
}
Is the path in that JSON correct?
I just create a directory named idacode, not debug plugin code, here is the files in that directory, please check.
Yes, I can confirm that the directory is correct on windows, thanks.
I just tried this on IDA 7.5 with Python 3, where did you put the "breakpoint" line?
I put the same line as yours, but it is not working, maybe something todo with python version? I use python2.7 shipped with IDA 7.0.
It may indeed be an issue with Python 2.7 and IDA 7.0. I'll check whether it works for me on that version.
How did you load the plugin in that version of IDA? I placed the files in the plugin directory but it isn't being loaded.
Place it in plugin folder, and change some code due to python 2.7 don't have asyncio. You can find the change here: https://github.com/ioncodes/idacode/pull/13/files/0319005853db6e2b126fd0b731abdf8380f438ae
Same to me, Python 3.8.10 and IDA 7.5.
Thanks for this wonderful extension ,it do make wrting ida python script much faster, I can step in, step out code, one strange thing I found is that I can't make break point from vsc, it said can't find the break point line, but I can make breakpoint inside idacode_utils, is there something with my config ? Thanks