function save()

in src/launchWizard/script.js [267:330]


function save() {
  var configSelectionBox = document.getElementById('configSelected')
  var configSelectedValue =
    configSelectionBox.options[configSelectionBox.selectedIndex].value
  var updateOrCreate =
    configSelectedValue === 'New Config' ? 'create' : 'update'

  const configValues = getConfigValues()

  var obj = {
    version: '0.2.0',
    configurations: [
      {
        request: 'launch',
        type: 'dfdl',
        name: configValues.name,
        schema: {
          path: configValues.schema,
          rootName: configValues.rootName,
          rootNamespace: configValues.rootNamespace,
        },
        data: configValues.data,
        debugServer: configValues.debugServer,
        infosetFormat: configValues.infosetFormat,
        infosetOutput: {
          type: configValues.infosetOutputType,
          path: configValues.infosetOutputFilePath,
        },
        tdmlConfig: {
          action: configValues.tdmlAction,
          name: configValues.tdmlName,
          description: configValues.tdmlDescription,
          path: configValues.tdmlPath,
        },
        trace: configValues.trace,
        stopOnEntry: configValues.stopOnEntry,
        useExistingServer: configValues.useExistingServer,
        openDataEditor: configValues.openDataEditor,
        openInfosetView: configValues.openInfosetView,
        openInfosetDiffView: configValues.openInfosetDiffView,
        daffodilDebugClasspath: configValues.daffodilDebugClasspath,
        dataEditor: {
          port: configValues.dataEditorPort,
          logging: {
            file: configValues.dataEditorLogFile,
            level: configValues.dataEditorLogLevel,
          },
        },
        dfdlDebugger: {
          logging: {
            file: configValues.dfdlDebuggerLogFile,
            level: configValues.dfdlDebuggerLogLevel,
          },
        },
      },
    ],
  }

  vscode.postMessage({
    command: 'saveConfig',
    data: JSON.stringify(obj, null, 4),
    updateOrCreate: updateOrCreate,
  })
}