Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.
The "Edit" button should launch VSCode. But now, it doesn't. I found it with my Windows 11, and verified with Windows 11 Enterprise Evaluation (here) on VirtualBox 7.0.12. VSCode has been changed something?
Solved! Go to Solution.
Solved by KarlRBS. Go to Solution.
The same happened to me today. I believe it was a change in the just released v2024.4.0 of the VSCode python extension. Unfortunately, downgrading the extension to the previously working v2024.2.1 did not solve the problem for me. Luckily it was a fairly simple fix for me so we don't have to wait for Fusion to be updated.
All we have to do is edit the pre-run.py file to change "pythonFiles" to "python_files". This script can be found in Fusion by opening Preferences > API and navigating to the "Default Path for Scripts and Add-Ins." From here, we just need to navigate to the ./Python/vscode directory where the script is stored. On a Mac, the full path may look like "/Users/<username_goes_here>/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Python/vscode/pre-run.py". Edit this file and find "pythonFiles" when setting msPythonPath and change it to "python_files". Restart Fusion and you should be good to go with v2024.4.0 of the ms-python.python extension. Here's the full difference:
+++ pre-run.py 2024-04-04
@@ -38,7 +38,7 @@
msPythonPath = os.path.expandvars(msPythons[0][0].path)
index = msPythonPath.rfind('.')
version = int(msPythonPath[index+1:])
- msPythonPath = os.path.join(msPythonPath, 'pythonFiles', 'lib','python')
+ msPythonPath = os.path.join(msPythonPath, 'python_files', 'lib','python')
msPythonPath = os.path.normpath(msPythonPath)
if os.path.exists(msPythonPath) and os.path.isdir(msPythonPath):
return msPythonPath
The reason for this change is described in the vscode-python changelog where it notes Issue #22921 "Rename pythonFiles to python_files". Hope that works for you too!
me too - worked fine thismorning, now I can't get anything done!
The above solution did nothing for me (Windows 10N)
** Update - you have to close and restart Fusion for this to start working.
Also fixes "debug":
It probably should not be marked as "Fixed" ... editing system files manually is a workaround - someone else really needs to find and fix the root problem here.
The above fix did not completely resolve the issue on my PC (Windows 11). There was something wrong with the Python Debugger extension :
20240405T114111 I .15948 VSCode:Starting script run
20240405T114111 I .15948 VSCode:Python manager initializing
20240405T114111 I .15948 VSCode:Running script
20240405T114111 I .15948 VSCode:Python manager initializing
20240405T114111 I .15948 VSCode:Running python script
20240405T114111 E .15948 NUBASE.PYTHON: failed to start python debugger:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'debugpy'
20240405T114111 I .15948 VSCode:Launching visual studio code editor failed
I had to downgrade the "Python" extension and the "Python Debugger" extension in VS Code to version v2024.2.1 and to version v2024.2.0
Jérôme Briot, Freelance engineer - Mechanical design and prototyping
3D Print Plus / Pro | IDF Import | GitHub To Fusion 360 | Tube Bending Data Exchanger | Slice Data Export
Memory Used | Basic Calculator | Check Computer Specifications | Import spline from any CSV file
On Windows, the pre-run.py file is located under :
C:\Users\<USERNAME>\AppData\Local\Autodesk\webdeploy\production\b6226a03d2af9e144aa8b1b7e17cf8eb0cd990f1\Python\vscode
If you don't find the b6226a03d2af9e144aa8b1b7e17cf8eb0cd990f1 folder, search for the newest one.
Jérôme Briot, Freelance engineer - Mechanical design and prototyping
3D Print Plus / Pro | IDF Import | GitHub To Fusion 360 | Tube Bending Data Exchanger | Slice Data Export
Memory Used | Basic Calculator | Check Computer Specifications | Import spline from any CSV file
Hey, I tried this but sadly it dosen't seem to work anymore. Is there some other solution?
See this post for a solution.
Can't find what you're looking for? Ask the community or share your knowledge.