in src/launchWizard/launchWizard.js [185:279]
function save() {
var configSelectionBox = document.getElementById('configSelected')
var configSelectedValue =
configSelectionBox.options[configSelectionBox.selectedIndex].value
var updateOrCreate =
configSelectedValue === 'New Config' ? 'create' : 'update'
const name =
configSelectedValue === 'New Config'
? document.getElementById('name').value
: configSelectedValue
const data = document.getElementById('data').value
const debugServer = parseInt(document.getElementById('debugServer').value)
const infosetFormat = document.getElementById('infosetFormat').value
const infosetOutputFilePath = document.getElementById(
'infosetOutputFilePath'
).value
const infosetOutputType = document.getElementById('infosetOutputType').value
const tdmlAction = document.getElementById('tdmlAction').value
const tdmlName = document.getElementById('tdmlName').value
const tdmlDescription = document.getElementById('tdmlDescription').value
const tdmlPath = document.getElementById('tdmlPath').value
const openHexView = document.getElementById('openHexView').checked
const openInfosetDiffView = document.getElementById(
'openInfosetDiffView'
).checked
const openInfosetView = document.getElementById('openInfosetView').checked
const program = document.getElementById('program').value
const stopOnEntry = document.getElementById('stopOnEntry').checked
const trace = document.getElementById('trace').checked
const useExistingServer = document.getElementById('useExistingServer').checked
const dataEditorPort = parseInt(
document.getElementById('dataEditorPort').value
)
const dataEditorLogFile = document.getElementById('dataEditorLogFile').value
const dataEditorLogLevel = document.getElementById('dataEditorLogLevel').value
const dfdlDebuggerLogFile = document.getElementById(
'dfdlDebuggerLogFile'
).value
const dfdlDebuggerLogLevel = document.getElementById(
'dfdlDebuggerLogLevel'
).value
const daffodilDebugClasspath = getDaffodilDebugClasspathString()
var obj = {
version: '0.2.0',
configurations: [
{
request: 'launch',
type: 'dfdl',
name: name,
program: program,
data: data,
debugServer: debugServer,
infosetFormat: infosetFormat,
infosetOutput: {
type: infosetOutputType,
path: infosetOutputFilePath,
},
tdmlConfig: {
action: tdmlAction,
name: tdmlName,
description: tdmlDescription,
path: tdmlPath,
},
trace: trace,
stopOnEntry: stopOnEntry,
useExistingServer: useExistingServer,
openHexView: openHexView,
openInfosetView: openInfosetView,
openInfosetDiffView: openInfosetDiffView,
daffodilDebugClasspath: daffodilDebugClasspath,
dataEditor: {
port: dataEditorPort,
logging: {
file: dataEditorLogFile,
level: dataEditorLogLevel,
},
},
dfdlDebugger: {
logging: {
file: dfdlDebuggerLogFile,
level: dfdlDebuggerLogLevel,
},
},
},
],
}
vscode.postMessage({
command: 'saveConfig',
data: JSON.stringify(obj, null, 4),
updateOrCreate: updateOrCreate,
})
}