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

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

olivier58SHD
Contributor Contributor
273 Views
1 Reply
Message 1 of 2

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

olivier58SHD
Contributor
Contributor

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

 

0 Likes
274 Views
1 Reply
Reply (1)
Message 2 of 2

billostratum
Advocate
Advocate

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
0 Likes