Update tclpro; add a test

This commit is contained in:
Ben Jackson 2020-07-08 13:19:14 +01:00
commit 402071065f
4 changed files with 68 additions and 2 deletions

View file

@ -208,9 +208,31 @@ GADGETS = {
'language': 'tcl',
'repo': {
'url': 'https://github.com/puremourning/TclProDebug',
'ref': 'f5c56b7067661ce84e205765060224076569ae0e', # master 26/10/2019
'ref': 'master'
},
'do': lambda name, root, gadget: InstallTclProDebug( name, root, gadget ),
'adapters': {
"tclpro": {
"name": "tclpro",
"type": "tclpro",
"command": [
"${gadgetDir}/tclpro/bin/debugadapter"
],
"attach": {
"pidSelect": "none"
},
"configuration": {
"target": "${file}",
"args": [ "*${args}" ],
"tclsh": "tclsh",
"cwd": "${workspaceRoot}",
"extensionDirs": [
"${workspaceRoot}/.tclpro/extensions",
"${HOME}/.tclpro/extensions",
]
}
}
},
'do': lambda name, root, gadget: InstallTclProDebug( name, root, gadget )
},
'netcoredbg': {
'language': 'csharp',

View file

@ -0,0 +1,5 @@
instrument::addExtension 2.0 {test}
instrument::addCommand Wrap { parseBody }
# vim: ft=tcl

View file

@ -0,0 +1,11 @@
{
"configurations": {
"Run Current Script": {
"adapter": "tclpro",
"configuration": {
"request": "launch",
"target": "${file}"
}
}
}
}

28
support/test/tcl/test Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env tclsh
set SCALAR g
array set ARRAY {key1 value1 key2 value2}
proc Wrap { body } {
uplevel 1 $body
}
proc Main {} {
global SCALAR
set prefix "VAR: "
Wrap {
puts $SCALAR
global ARRAY
puts [array names ARRAY]
set vars [list]
foreach n [array names ::env] {
set prefix "ENVVAR: $n = "
puts "$prefix $::env($n)"
lappend vars $n
}
}
puts $vars
}
Main