"Failed to read Python Script" error message occurs in VSCode debug console when trying to debug Descriptor.py
apric0ts opened this issue · 2 comments
There seems to be some sort of issue (possibly on just my end), when the script is launched through Fusion 360 by pressing "Edit", I can't debug the Descriptor.py file.
This is the error message in the Debug Console:
I can debug the other Fusion 360 sample scripts such as Bolt.py and Bottle.py, however VSCode says it can't read this python script. I've uninstalled and reinstalled the Python extensions to have the correct versions by using Fusion 360 to install what's needed.
(The steps I've taken are in comment 17 of this autodesk forum post, part B: https://forums.autodesk.com/t5/fusion-360-api-and-scripts/not-able-to-debug-scripts-add-ins-in-visual-studio-code/td-p/9174815 )
However, issue persists.
Steps to fix this issue:
- Try to work through the solution in link above, if does not work, then try this:
- Delete all the .vscode and .vs folders in the repo
- Then open the debug for the other scrips that work
- Then right click and open the file location
- Then copy over any of the .vs folders and or .json files
- Double check the files before opening fusion or vscode that they don't have anything specific to the project name, if they do change it
The fix for me was simply adding a Descriptor.manifest
file with the following content:
{
"autodeskProduct": "Fusion360",
"type": "script",
"author": "",
"description": {
"": ""
},
"supportedOS": "windows|mac",
"editEnabled": true
}
I found this by creating a new script from inside of Fusion to make sure that it works, as suggested by @apric0ts, and copying over the files. I did not need the .vscode
folder with the .json
files but do need the manifest file for it to work.