Update tclpro; add a test
This commit is contained in:
parent
e24d0a4659
commit
402071065f
4 changed files with 68 additions and 2 deletions
|
|
@ -208,9 +208,31 @@ GADGETS = {
|
||||||
'language': 'tcl',
|
'language': 'tcl',
|
||||||
'repo': {
|
'repo': {
|
||||||
'url': 'https://github.com/puremourning/TclProDebug',
|
'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': {
|
'netcoredbg': {
|
||||||
'language': 'csharp',
|
'language': 'csharp',
|
||||||
|
|
|
||||||
5
support/test/tcl/.tclpro/extensions/test.pdx
Normal file
5
support/test/tcl/.tclpro/extensions/test.pdx
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
instrument::addExtension 2.0 {test}
|
||||||
|
|
||||||
|
instrument::addCommand Wrap { parseBody }
|
||||||
|
|
||||||
|
# vim: ft=tcl
|
||||||
11
support/test/tcl/.vimspector.json
Normal file
11
support/test/tcl/.vimspector.json
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"configurations": {
|
||||||
|
"Run Current Script": {
|
||||||
|
"adapter": "tclpro",
|
||||||
|
"configuration": {
|
||||||
|
"request": "launch",
|
||||||
|
"target": "${file}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
28
support/test/tcl/test
Normal file
28
support/test/tcl/test
Normal 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue