Stubs for Qt in Visual Studio Code

Qt5

To get code completion for Qt5 in vscode do:

  1. download the compressed file from Client Challenge

  2. Unpack the folder PyQt5-stubs into /Applications/IDA Professional 9.2.app/Contents/MacOS/python/ folder. So that /Applications/IDA Professional 9.2.app/Contents/MacOS/python/PyQt5 exists.

  3. Put the path /Applications/IDA Professional 9.2.app/Contents/MacOS/python into your analysis.extraPaths and autoComplete.extraPaths.

Pyside6

PySide6 is a bit less involved:

  1. Put the path /Applications/IDA Professional 9.2.app/Contents/MacOS/python/PySide6/python3/site-packages into your analysis.extraPaths and autoComplete.extraPaths.

This snippet from ~/Library/Application Support/Code/User/settings.json might help you:

   "python.autoComplete.extraPaths": [
       "/Applications/IDA Professional 9.2.app/Contents/MacOS/python",
       "/Applications/IDA Professional 9.2.app/Contents/MacOS/python/PySide6/python3/site-packages",
       "/Applications/Binary Ninja.app/Contents/Resources/python"
   ],
   "python.analysis.extraPaths": [
       "/Applications/IDA Professional 9.2.app/Contents/MacOS/python",
       "/Applications/IDA Professional 9.2.app/Contents/MacOS/python/PySide6/python3/site-packages",
       "/Applications/Binary Ninja.app/Contents/Resources/python"
   ],
3 Likes

Huge kudos and thanks to @Milanek for sharing this step-by-step guide for adding Qt stubs.
This is (again!) a helpful tip for anyone using VS code.