vdm-vscode icon indicating copy to clipboard operation
vdm-vscode copied to clipboard

"Add VDM Run Configuration" gives wrong defaultName

Open nickbattle opened this issue 2 years ago • 2 comments

The "Add VDM Run Configuration" menu option builds a launch entry with an incorrectly set defaultName (and the wrong title, though that is harmless). For example:

	{
		"name": "Launch VDM Debug from f[nat](1,2,3)`DEFAULT",
		"type": "vdm",
		"request": "launch",
		"noDebug": false,
		"defaultName": "f[nat](1,2,3)",
		"command": "print f[nat](1,2,3)"
	}

The "command" is correct, but the defaultName is set to the launch expression and the "name" has the module name and expression the wrong way round. There's a similar problem in VDM++ specs.

nickbattle avatar Nov 08 '23 10:11 nickbattle

Incidentally, the was something my students were experiencing as well: this "name" with the expression was leading to an XDebug print out of the VDM SL file without starting the interpreter.

leouk avatar Nov 08 '23 10:11 leouk

@leouk That's very strange. I just get the following, when trying to run f: set of bool -> nat, passing {true, false}

Module f({true, false}) not loaded
Init terminated.

Session disconnected.

nickbattle avatar Nov 08 '23 17:11 nickbattle

This appears to be fixed in 1.5.0, closing.

nickbattle avatar Nov 10 '24 17:11 nickbattle