Closed zero-plusplus closed 3 years ago
What would runtimeDir offer that is different from runtime?
"launch": {
"configurations": [
{
"name": "AHK V2 Debug",
"request": "launch",
"type": "autohotkey", // identifies the debugger
"runtime": "J:/StandaloneApps/AutoHotkeyV2/AutoHotkeyU64.exe",
"launch": {
"configurations": [
{
"name": "AHKv2[a118] Debug",
"request": "launch",
"type": "autohotkey", // identifies the debugger
"runtime": "J:/StandaloneApps/AutoHotkey_v2.0-a118-1e6cd8a1/AutoHotkeyU64.exe",
You can configure the current directory when you make runtime a relative path.
It is possible to set it as follows.
{
"runtimeDir": "w:/tools/AutoHotkey",
"runtime_v1": "AutoHotkey.exe"
"runtime_v2": "v2/AutoHotkey.exe"
Traditionally, you would have to set it up as follows.
{
"runtime_v1": "w:/tools/AutoHotkey/AutoHotkey.exe"
"runtime_v2": "w:/tools/AutoHotkey/v2/AutoHotkey.exe"
It's not a big change, but it will make it somewhat easier to see.
If I recall, I cannot do it that way because I use .ahk for both v1 and v2. Is that correct?
You can use it, but it won't be of much benefit.
In your example, you can change this as follows.
"launch": {
"configurations": [
{
"name": "AHK V2 Debug",
"request": "launch",
"type": "autohotkey", // identifies the debugger
"runtimeDir": "J:/StandaloneApps/AutoHotkeyV2"
"runtime": "AutoHotkeyU64.exe",
"launch": {
"configurations": [
{
"name": "AHKv2[a118] Debug",
"request": "launch",
"type": "autohotkey", // identifies the debugger
"runtimeDir": "J:/StandaloneApps/AutoHotkey_v2.0-a118-1e6cd8a1"
"runtime": "AutoHotkeyU64.exe",
Perhaps runtimeCwd
is more appropriate than runtimeDir
I am curious - what is meaning of "Cwd"?
It's an abbreviation for Current Working Directory
The relative path is converted to a full path based on this directory.
If you look here, it seems to be an appropriate name since cwd
is a common option supported by the debugger.
I don't know what "runtime's current working directory" means, if I think about it. Normally, There is one "current" working directory. This misleads people into thinking there's more than one it.
So if I' m going to implement it, runtimeDir
seems to be a better choice.
If the #62 is implemented, it might be a little more useful, since it requires setting the runtime path to up to five file extensions - ahk
, ah2
, ahk2
, ahkh
, and ahkh2
.
Since runtime will be deprecated in the future, this draft will be discarded.
Is there a demand for being able to change the default directory of the
runtime
? It is currently pinned toC:\Program Files\AutoHotkey
.