Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does setting breakpoint from vsc supported ? #16

Open
puppywang opened this issue Aug 10, 2020 · 12 comments
Open

Does setting breakpoint from vsc supported ? #16

puppywang opened this issue Aug 10, 2020 · 12 comments

Comments

@puppywang
Copy link

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

@ioncodes
Copy link
Owner

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
Copy link
Owner

I'll close this for now, if there's still an issue feel free to reopen the issue!

@puppywang
Copy link
Author

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.

debugpy.server-34804.log
debugpy.adapter-44868.log

@ioncodes ioncodes reopened this Aug 14, 2020
@ioncodes
Copy link
Owner

Are you debugging an IDA plugin? Can you show me parts of the source code?

@ioncodes
Copy link
Owner

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?

@puppywang
Copy link
Author

I just create a directory named idacode, not debug plugin code, here is the files in that directory, please check.

idacode.zip

Yes, I can confirm that the directory is correct on windows, thanks.

@ioncodes
Copy link
Owner

I just tried this on IDA 7.5 with Python 3, where did you put the "breakpoint" line?

image

@puppywang
Copy link
Author

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.

@ioncodes
Copy link
Owner

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.

@ioncodes
Copy link
Owner

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.

@puppywang
Copy link
Author

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

@wallds
Copy link

wallds commented Nov 9, 2021

Same to me, Python 3.8.10 and IDA 7.5.

Screenshot 2021-11-09 105853

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants