VSCode + MacOS Simulator Quirkiness

PREFACE: if you're on a Windows machine, please feel free to skip this discussion as I (and likely others) really need specific solutions. And in my case, I've already scanned the forums and removed the space from the SDK path.

For those of you developing ConnectIQ apps on MacOS and have tried out VSCode, has anyone else encountered any of the following quirks? And if so, has anyone found any ways to resolve any of the issues?

  1. VS Code runs the build task/command and doesn't start the simulator
  2. VS Code starts the simulator (if not already running) but the simulator does not run the newly changed code/PRG (even with multiple consecutive attempts)
  3. When switching to a new device, the simulator shows the image of the new device but is running code for the previous device; most noticeable with device size changes (eg. 240x240 to 280x280)

For completeness, here's what I'm running for a development environment:

  • MacOS 10.15.7
  • Connect IQ 3.2.3 (in a location without spaces)
  • JDK 8 Update 151
  • VS Code 1.51
  • Connect IQ extension 0.1.7
  • it certainly works differently to Eclipse and I'm not 100% certain of the order you're meant to action things.

    I have the same environment as you, except I have update 152 of Java and VSCode 1.51.1.  

    I've seen quirk number 2 previously, but what I do now is right-click in explorer and run "Build Current Project" whenever I need to work on a new device type, or a different App.  Following that, I right-click in explorer and run "Run App" and this starts the simulator.  It seems to me that "Run App" points to whatever location the last "Build Current Project" was run from.  If you make more changes to your code (for the current device and app) and then "Run App" again, it seems to rebuild ok.  I don't fully understand this intricacy.  I'm just happy that since 0.1.6 I don't have to "run twice".  Also, I'm certain that the simulator loads and launches much faster in VSCode.

  • I figured out a workaround to use Visual code and simulator, hope it helps: forums.garmin.com/.../1190915

  • Yep I've seen all 3 of these things (I use OpenJDK 11 on Windows), more than once, but not consistently.

    For 3, I only see this if I get impatient and try to launch the Run task before the Build task is complete. For me personally, this edge case could be fixed by having a "Build Currrent Project and Run App..." task so we could switch devices, build, and run in a single step. (I don't like waiting for the build to finish just so I can launch Run, although I am grateful that the Run task does use the last selected build -- I just wish there was also a Run task that lets you change the build target.)

    I've also seen behavior where sometimes Run App does not trigger a rebuild (of the last built target) when it should (normally it does.)