Losing VS code debugger connection after Fusion 360 September update
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm having troubles with debugging add-ins after the September 2020 update (2.0.8950). (I'm also having problems with scripts, but I don't do much scripts, so let's start with add-ins).
I changed from the 2019.something Python extension in Code to the latest version, to even get started. I have also tried moving to 2020.8.109390, as it was recommended in another thread.
I can start Debug from Fusion 360 and it launches Visual Studio Code. I then run my add-in using F5 (It took a while before I figured out that the debugger will no longer break at start. I think I like this way. Just got used to the other one.). I re-run my add-in a few times using Ctrl+F5 and suddenly I get problems with the debugger connection.
Edit: OK, I tested some more, and it seems that if I accidentally press F5 things get messed up. I get errors as soon as I press Ctrl+F5 again. I guess Code tries to set up an extra connection. This is too easy to do.
Problems look like this:
First Ctrl+F5:
Trying ctrl+F5 again: Nothing happens (Maybe the session is stopped here).
Trying F5:
Then I go into Fusion and stop the add-in and try to debug again:
Looking in Code, I don't see any sessions(?). The status bar is blue (not attached) as well.
Closing all VS code instances does not help. I have to restart Fusion 360.
It seems I might have to close VS code as well, to not have stale data(???). At least when I tried just now, only restart Fusion, VS code could not connect after I clicked Debug in Fusion. Actually, right now, it seems that my Fusion 360 cannot even launch VS Code. It shows the command line window and then nothing happens..
Is there a better way to reset the state in Fusion? Is it possible to "block" this from happening?
PS. Try typing a message while launching Fusion several times. I knew it stole focus, but it seems to also get my Ctrl key activated somehow (pressing N while typing and Fusion launching, I got a new window in Firefox). I am running through remote desktop.