Editing child scripts with VScode

Typically: "How do I... ", "How can I... " questions
Post Reply
mthor13
Posts: 61
Joined: 03 Jul 2017, 08:32
Contact:

Editing child scripts with VScode

Post 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

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Editing child scripts with VScode

Post 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

mthor13
Posts: 61
Joined: 03 Jul 2017, 08:32
Contact:

Re: Editing child scripts with VScode

Post by mthor13 »

Thanks!

Post Reply