Visual Studio not launching when selecting edit add-ins

paul.slaterMZZFE
Advocate

Visual Studio not launching when selecting edit add-ins

paul.slaterMZZFE
Advocate
Advocate

Visual Studio Code will not run when edit is selected. this has become a problem since a Fusion update.

 

would someone be kind enough to help please?

 

thanks Paul.

0 Likes
Reply
Accepted solutions (2)
4,681 Views
39 Replies
Replies (39)

goyals
Autodesk
Autodesk

May be you can try deleting ms python extensions folder, start with name ms-python.python-xxx, from the following location and retry the edit/debug workflow from Fusion. Doing this will re-install the extension at the same location. Let us see if this resolves the problem. 

 

Mac: /Users/<user name>/.vscode/extensions/

Windows: C:/Users/<user name>/.vscode



Shyam Goyal
Sr. Software Dev. Manager
0 Likes

paul.slaterMZZFE
Advocate
Advocate
I have renamed the extensions folder and re started Fusion and it said that extension being loaded but after that it did not launch Fusion.
Regards Paul.
0 Likes

paul.slaterMZZFE
Advocate
Advocate
Sorry, did not launch VS Code.
0 Likes

Nilesh.Mohite
Autodesk
Autodesk

Hi @paul.slaterMZZFE ,
As kindly suggested by @goyals please find detailed steps to clear vscode extesions.

Please do following steps.

  1. Close Fusion 360
  2. Uninstall python extensions from vs code
  3. Close vs code
  4. Go to '%homepath%\.vscode\extensions' or for mac  '~/.vscode/extensions' 
  5. Clear any ms-python extension directories like ms-python.python-20##.###
  6. Delete ".obsolete" file
  7. Start fusion
  8. Go to addins and debug or edit any sample add-in script.
  9. You should able to debug it successfully.

PLease lets us know if you need further help
 


Nilesh Mohite
LinkedIn

If my answer helped you, please use  ACCEPT SOLUTION .
Also be generous with Likes!  Thank you and enjoy!

0 Likes

paul.slaterMZZFE
Advocate
Advocate
I have tried what you have advised but still exactly the same.
Regards Paul.

[cid:image001.png@01D6FA3F.F306EF90]
0 Likes

goyals
Autodesk
Autodesk

I am not able to reproduce the problem on my side. Can you please share fusion log files from your machine? It might give us some clue to understand the problem better. Please take a look at this post explaining how you can collect fusion log files manually on your machine. https://knowledge.autodesk.com/support/fusion-360/learn-explore/caas/sfdcarticles/sfdcarticles/How-t... . Thanks.



Shyam Goyal
Sr. Software Dev. Manager
0 Likes

paul.slaterMZZFE
Advocate
Advocate
Nilesh -I have attached the file as requested. I also have another PC that I use and it has Fusion 360 and it behaves exactly the same.
Thank you and kind regards Paul
0 Likes

Nilesh.Mohite
Autodesk
Autodesk
Can you reattach the file? First attachment is missing.

Nilesh Mohite
LinkedIn

If my answer helped you, please use  ACCEPT SOLUTION .
Also be generous with Likes!  Thank you and enjoy!

0 Likes

paul.slaterMZZFE
Advocate
Advocate

Nilesh -please find attached. Regards Paul.

0 Likes

BrianEkins
Mentor
Mentor

I recently had the same problem and was able to fix it by exiting Fusion and use Task Manager to make sure there isn't a Fusion process running in the background,  delete the entire .vscode folder, and restart Fusion.  Hopefully, that works for you.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
1 Like

paul.slaterMZZFE
Advocate
Advocate

Brian -thank you for your advice. I have just tried that and it still does not work.

I am not sure if you picked up that I have it on both my pc’s exactly the same?

Also do you see the CMD window with some buffer issues? please see attached file.

 

kind regards Paul.

0 Likes

BrianEkins
Mentor
Mentor

I did see the command window and I believe I had the same buffer warnings.  I believe that is just a warning about a function being used that's been deprecated.

 

Does VS Code start for you from the Start Menu?  You still need it to start from Fusion to be able to debug, but that would at least tell you that VS Code is installed and working and the problem is probably on the Fusion side?

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
2 Likes

paul.slaterMZZFE
Advocate
Advocate
Brian yes VSCode does start from the windows prompt. Hope that helps. Regards Paul.
0 Likes

Nilesh.Mohite
Autodesk
Autodesk

Hi @paul.slaterMZZFE
Thanks for logs.
We will go through the same.
I could able to see the same screen. I just hit Enter on that screen and it went ahead and installed the extension. You can try this.

Screenshot 2021-02-04 at 12.39.36 AM.png

But if that doesn't work for you then meanwhile can you try following workaround.
Repeate the earlier process up to the 6th point 

  1. Close Fusion 360
  2. Uninstall python extensions from vs code
  3. Close vs code
  4. Go to '%homepath%\.vscode\extensions' or for mac  '~/.vscode/extensions' 
  5. Clear any ms-python extension directories like ms-python.python-20##.###
  6. Delete ".obsolete" file
    (At this point if want to clear any remaining fusion process on safer side, you can try restarting machine if possible)
  7. Now open the VScode separately
  8. Go to extesions
  9. Search ms-python in search bar
  10. Install Python extension
  11. After successful installation you can close vs code
  12. Now start fusion and try to edit or debug script
    let me know if this works for you.

     

    Installing extesion manually.png

Nilesh Mohite
LinkedIn

If my answer helped you, please use  ACCEPT SOLUTION .
Also be generous with Likes!  Thank you and enjoy!

1 Like

paul.slaterMZZFE
Advocate
Advocate
Nilesh I will try in the morning and let you know. Regards Paul
0 Likes

goyals
Autodesk
Autodesk

By looking at the logs it seems like Fusion is not able to open the port on which VSCode can communicates with it. Can you try the below script in text command window after switching to python mode? Here is a blog explaining the steps how to switch to python mode in text command window in Fusion.  https://modthemachine.typepad.com/my_weblog/2020/01/run-commands-from-the-text-commands-panel.html

 

import debugpy

debugpy.listen('127.0.0.1',9000) #9000 is default port number which Fusion use to communicate with VSCode.

Are you seeing any error while executing this script on Fusion side?

 



Shyam Goyal
Sr. Software Dev. Manager
0 Likes

paul.slaterMZZFE
Advocate
Advocate
Goyals -thank you for your advice. This is the result that I got
import debugpy
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'debugpy'


debugpy.listen('127.0.0.1',9000)
Traceback (most recent call last):
File "", line 1, in
NameError: name 'debugpy' is not defined
Thanks Paul.
0 Likes

goyals
Autodesk
Autodesk

This error indicates possibly two things:

1. Extension is not installed properly on your machine. I am having 2021.1.502429796 version on my machine and it does have debugpy module so probably you can check how is the status on your side. 

2. We assumed that extension is installed at the following location and add the path of debugPy module in python system path from this location. So another possible reason is extension installed at different path other than below path for you.

Windows: '%USERPROFILE%\.vscode\extensions'

Mac:~/.vscode/extensions

 

As a workaround you can try adding the path of debugPy module in to Fusion python interpreter system path and see if it resolve problem for you or you can keep the extensions at the above path.


I hope it helps. Thanks.



Shyam Goyal
Sr. Software Dev. Manager
0 Likes

paul.slaterMZZFE
Advocate
Advocate
Goyals -this is a copy of the path for the extensions:

C:\Users\Admin\.vscode\extensions

I am not sure how to add the path for the debugpy.

Is it possible that someone could just log on and sort this for me please? I can confirm that I am a maintenance subscriber.

Thank you. Paul.

0 Likes