NVDA addon creation development environment #addon

Florian Beijers


So first, if this isn't the place to ask this question, please let me know. It seemed the most suitable, but I might have missed a resource :)

I am trying to create a development environment for creating addons based on Visual Studio Code. I am running into a bit of a snag though, hoping someone here might know what I am missing. My steps:

- recursively cloned nvaccess/nvda
- cloned nvda-vscode into the root of that folder under .vscode
- Opened the folder using file -> open folder... in Visual Studio Code Insiders.
- As a test, I wanted to build the notepad.py example in the developer guide to see if intellisense and such would come up. So I added %appdata%\roaming\nvda\appModules to the workspace.
- Selected my python interpreter as being python 3.8.1 32-bit within the global scope for both folders in the workspace, this setting invoked through a gesture appears to be folder-specific rather than workspace-wide.
- Created a new file within appModules called notepad.py with the following content:

import appModuleHandler

class AppModule(appModuleHandler.AppModule):

After doing all this, these are my observations:

- The visual studio code problems view reports appModuleHandler could not be imported.
- Similarly, autocomplete does not come up for NVDA-specific options.
- My appModule is not loaded according to nvda+ctrl+f1. However, that could have to do with the pass statement, does that unload the module?

A few questions:

- Does anyone see something obvious I might have missed?
- When I run scons source to prepare the source tree, scons tells me it can't find python 3.7-32. This is true, I don't have that specific version of Python installed. Is that why this is happening?
- Am I on completely the wrong track and can I get NVDA's python context into VS Code some other way?

Thanks a bunch for any help :)

Join nvda-addons@nvda-addons.groups.io to automatically receive all group messages.