Page 1 of 1

Editing child scripts with VScode

Posted: 05 Jul 2022, 07:47
by mthor13
Hi Coppelia & Everyone else,

Does anyone have a trick or solution for including the sim and simROS2 libs when editing python child scripts in VScode?
Currently, VScode does not recognize either sim and simROS2 (see https://imgur.com/rrPWKnC), but I would like to use the IDE functionality to get suggestions when using the two libraries and avoid import errors.

All the best,
Mathias Thor

Re: Editing child scripts with VScode

Posted: 05 Jul 2022, 13:09
by coppelia
Hello Mathias,

have a look at the add-on generate notepad++ files (maybe also in the exporters section of Modules). That add-on is basically fetching all the API functions and constants, and generating 2 files compatible with notepad++, to provide code completion and call tips. By slightly adjusting that add-on, you can probably generate a VScode extension file for API functions/variables that you need. You'll have to search how to extend VS' intelliSense, probably just a matter of adding or modifying a json file.

Cheers

Re: Editing child scripts with VScode

Posted: 05 Jul 2022, 14:22
by mthor13
Thanks!