Skip to main content
Fightergator
Inspiring
July 14, 2023
Question

Running FrameMaker Scripts From Visual Studio

  • July 14, 2023
  • 1 reply
  • 405 views

I'm using Visual Studio (VS) to develop and test FrameMaker scripts.  All works fine, but to test a script from inside Visual Studio I have to click F5 (Run > Start Debugging), then select the host application (FrameMaker 2020, ver 16.0) from a dropdown list of about a dozen apps.  Is there a way to configure VS so script simply executes when I press F5.  I'm guessing it has something to do with configurations, but I have no idea what change(s) to make to configure FrameMaker 2020 as the default.  The settings.json currently reads:

{
    "editor.minimap.enabled": false,
    "workbench.colorTheme": "Tomorrow Night Blue",
    "launch": {
        "configurations": [
        {
            "type": "extendscript-debug",
            "request": "launch",
            "name": "Launch Script in ExtendScript Engine"
        }
        ]
    }
}

 

    This topic has been closed for replies.

    1 reply

    K.Daube
    Community Expert
    Community Expert
    July 15, 2023

    Fightergator,

    As You can see from my own experience (https://www.daube.ch/docu/files/FMjsxLib.pdf, page 275) I also have not managed to get a more straight route...

    Fightergator
    Inspiring
    July 15, 2023

    Thanks Klaus.   Your tip on running the code using F5 and selecting the FM version was a real help a few weeks back when I first installed VS.  As a result, I was up and working in less than an hour.  Here's a few differences between my installation and what you describe on pages 275-276.  I use a VS desktop icon that I've pinned to the taskbar to launch VS.  It opens almost immediately.  Also, when I hit F5 and select my FM version from the dropdown list, the script executes immediately.  You mentioned a >3 second pause. If a settings.json script runs at startup, it's whatever the default was when I installed VS. 

    Thanks for taking the time to reply.  I have to believe that the settings.json is the answer to our problem, but I have no idea what the correct configuration should be.