Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fusion360/Vscode: can't stop script execution on a breakpoint

1 REPLY 1
Reply
Message 1 of 2
olivier58SHD
92 Views, 1 Reply

Fusion360/Vscode: can't stop script execution on a breakpoint

Hello,
I am new to develop scripts with fusion (not new to python),  and I am trying to debug with VScode.
I run my script through the  'scripts' window and click on debug, which make the VScode window open.
Then I set a breakpoint on  the left of a code line, red dot appears.

Then I relaunch 'debug' from scripts windows in fusion, and... nothing really  happens in VScode.
I would have expect at least a stop on the breakpoint. It looks lost in the code, and I can't visualize any variable, nor any print.
Did I miss something  to configure  VSCode for fusion ?
Is it possible to stop on breakpoints and visualize datas  ?

olivier58SHD_0-1697662909720.png

 

1 REPLY 1
Message 2 of 2
billostratum
in reply to: olivier58SHD

I tried a large number of workflows before I got this working well.

 

I click the Edit button to open a VS session instead of debug.

 

Then set breakpoints.

 

Press F5 (Run, Start Debugging)

 

Breakpoints are hit nicely, values can be inspected, and code executed in the Debug Console.

 

***** Here is the key ***** (mentioned briefly in the "Python Specific Issues" docs)

Click the tiny, orange 'Disconnect' button (or Shift-F5) to terminate the current session. You do not need to close VS, and you can Run again, and go back and forth between VS and Fusion.

 

If you try to start the debugging session in any other way (I think I've tried them all), you may have to restart Fusion to continue.

 

Bill

billoStratum

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report