Thank you for the VS Code extension, Garmin! (And some thoughts)

Just wanted to say thank you so much to Garmin for creating the Monkey C VS Code extension. To be honest, the only reason I use Eclipse at all is for Monkey C, and I think I speak for most devs when I say that I will be very happy when I can finally leave it behind forever.

I especially like the way that "Run App" remembers the last device that was selected for "Build Project", which addresses a huge UX pet peeve from Eclipse.

Having said that, I have a few observations / feature requests (what a shocker):

  •  It would be nice to have a "Build and Run App For Device..." option which allows us to select a device to build and run in a single step (in addition to the standard "Run App" task, which is very useful)
  •  The UX of multistep tasks such as "New Project" or "Edit Application" has taken a step backwards. I realize this is due to the design of VS Code extensions --  i.e. the lack of built-in forms support. While I am sure nobody wants to go back to modal wizard dialogs, it would be nice if multistep tasks were implemented in a webview. That way all of the properties in the manifest could be combined into one or two views (like the manifest editor in the Eclipse CIQ plugin), instead of having several separate tasks such "Edit Products", "Edit Languages", "Edit Application", etc. For this kind of thing, I would personally be happy with a tabbed property/settings page, e.g. something like the VS Code settings page, or even the old Eclipse tabbed manifest editor view.
    • e.g. One problem with tasks like "Edit Application" is there's no indication what the current settings are -- it's basically a write-only task
    • "Edit Products": The use of a QuickPick is a little clunky considering there's 56 different products (at least). A long list like this would work a lot better in a view, IMO. However, the current implementation with filtering and the ability to select/deselect all filtered items is nice.
      • I miss the Eclipse tooltip for products which indicates the screen type (e.g. round-240x240). Would be nice if the screen type was displayed in the QuickPick list (along with the device type qualifier -- e.g. 'fenix6' -- which is currently displayed)

Having said all of that, once feature parity is achieved, I'll probably switch to VS Code completely and never look back. (I guess app settings and debugging are some of the last pieces of the puzzle?)

Thanks again!

  • Thanks for the feedback. We'll discuss your suggestions and see about adding them to our roadmap.

    It would be nice to have a "Build and Run App For Device..." option which allows us to select a device to build and run in a single step

    You can do this now. If you create a tasks.json and launch.json file you can make the launch.json dependent on the tasks.json. Then you can press F5 and it'll build then run. Here's an example:

    tasks.json

    {
        "tasks": [
            {
                "type": "monkeyc",
                "device": "approachs62",
                "simulatorBuild": true,
                "problemMatcher": [
                    "$monkeyc.error",
                    "$monkeyc.warning"
                ],
                "label": "monkeyc: approachs62",
                "group": {
                    "kind": "build",
                    "isDefault": true
                }
            }
        ]
    }

    launch.json

    {
        "version": "0.2.0",
        "configurations": [
            {
                "type": "monkeyc",
                "request": "runApp",
                "name": "Run App",
                "device": "approachs60",
                "preLaunchTask": "monkeyc: approachs62"
            }
        ]
    }

    The preLaunchTask entry in launch.json will make it build before running. We'll also discuss having the Build and Run option.

    One problem with tasks like "Edit Application" is there's no indication what the current settings are

    The current value is the one that's listed first. We definitely need to indicate that via text as well though.

  • Thanks , appreciate it!

    For context, I happily use VS Code for work every day, so none of this is coming from a place where I'm unfamiliar or unhappy with how VS Code is "supposed" to work.

    The launch/task example above is helpful (I was already thinking of creating tasks to automate certain things), but I'm guessing it isn't possible to accomplish having the task prompt the user for the device to run and build, at least not with the method suggested above.). (Although I think Run App actually does prompt for device if you open a project and select Run App before you do anything else, as there is no "previous build target" to be run.)

    The use case I'm thinking of here is manually testing lots of different devices, when you want to switch between devices on demand. (I'm sure there could be ways to script this, but it would be nice to have a standard command in the Monkey C extension.)

    The current value is the one that's listed first. We definitely need to indicate that via text as well though.

    Oh right, that should've been obvious haha. I didn't look closely enough and assumed they were defaults, not current values.

    I still think for complex multi-step tasks (including interdependent tasks like selecting min SDK version and devices), it would be nice to have a WebView that allows us to see multiple settings at once. I realize the standard UX for VS Code extensions is to have simple and (mostly) single-task oriented commands in the command palette (which is nice for things like build commands, toggles and simple selections), but I don't know if that works for everything.

    I do think Edit Application, Edit Products and Set Products by Connect IQ Version are interdependent and complex enough (with long lists) that they could benefit from being combined into a web view (along with other app properties).

    Case in point: Microsoft's C/C++ extension has a config UI page with logically grouped settings and plenty of explanatory text. It would be great to see something like this for Monkey C project settings.

    I like the command palette a lot, but I don't know if I want *everything* in there.

  • The current value is the one that's listed first. We definitely need to indicate that via text as well though.

    BTW, this doesn't seem to apply to the min supported SDK version (although I do see this working properly with the other 4 properties under Edit Application..

  • Thanks for the Microsoft C/C++ example. I've added that to the ticket for discussion. We'll get the current SDK version not being listed first fixed.

  • the multi-edit window looks cool, maybe you can also use this technique to implement app settings? 

    is there a way to assign shortcuts to commands (I keep disliking having to press CTRL-P all the time)

  • is there a way to assign shortcuts to commands (I keep disliking having to press CTRL-P all the time)

    In the command palette (CTRL-SHIFT-P / CMD-SHIFT-P), search for the command you want to edit, click on the gear to the right of it and it opens up the corresponding entry in Keyboard Shortcuts, where you can assign the keybinding of your choice (which can be context-sensitive.)

    Or open the the command palette and search for Keyboard Shortcuts, then search for the command you want.to edit.

    In the Explorer (left-hand pane), you can also right-click and see certain predefined commands:

    - Build Current Project

    - Run App

    - Run Tests

    - New Project

    I think you can write your own extension to customize these entries, or we can ask Garmin to add to them / provide customization options.