Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pseudo-variable ${ahk:suppressErrorDialog} #213

Closed
Tracked by #214
zero-plusplus opened this issue May 21, 2022 · 3 comments
Closed
Tracked by #214

Add pseudo-variable ${ahk:suppressErrorDialog} #213

zero-plusplus opened this issue May 21, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@zero-plusplus
Copy link
Owner

This attribute is for resolving #60.

If enabled this attribute, load the this script with /include command line argument of AutoHotkey

This script suppresses error dialogs and adds call stack information to error messages.

Note that /include has the limitation that only one script can be specified, so if you want to specify it in runtimeArgs, you will have to give up one of them.

The name useExtendedErrorMessage is tentative and may be changed if a more descriptive name is found.

@zero-plusplus zero-plusplus added the enhancement New feature or request label May 21, 2022
@zero-plusplus zero-plusplus mentioned this issue May 21, 2022
62 tasks
@zero-plusplus zero-plusplus changed the title Add useExtendedErrorMessage to launch.json Provide users with a method to suppress error dialogs May 28, 2022
@zero-plusplus
Copy link
Owner Author

While useExtendedErrorMessage could be easily set by the user, there was a issue of conflict with the runtimeArgs setting.
Thus, instead of adding a new attribute, I decided to solve this issue by providing a pseudo-variable that replaces the path to the library.

This pseudo-variable is only valid for runtimeArgs, runtimeArgs_v1, runtimeArgs_v2 and skipFiles.

Use the following.

...
"runtimeArgs": [
    "/include",
    "${lib:SuppressErrorDialog}"
]
"skipFiles": [
    "${lib:SuppressErrorDialog}"
]
...

@zero-plusplus
Copy link
Owner Author

I decided to add a new configuration snippet that serves as an example of the use of this pseudo-variable.

...
{
    "name": "AutoHotkey Debug",
    "type": "autohotkey",
    "request": "launch",
    "program": "${file}",
    "runtimeArgs": [
        "/CP65001",
        "/ErrorStdOut=UTF-8",
        "/include ${SuppressErrorDialog.ahk}"
    ],
    "args": [],
    "port": "9002-9010",
    "useAnnounce": "detail",
    "useAutoJumpToError": true,
    "useDebugDirective": true,
    "usePerfTips": true,
    "useOutputDebug": {
        "useTrailingLinebreak": true
    },
    "skipFiles": [
        "${SuppressErrorDialog.ahk}"
    ],
    "openFileOnExit": "",
    "variableCategories": "recommend"
},
...

zero-plusplus added a commit that referenced this issue Jun 12, 2022
@zero-plusplus zero-plusplus changed the title Provide users with a method to suppress error dialogs Add pseudo-variable ${ahk:suppressErrorDialog} Aug 27, 2022
@zero-plusplus
Copy link
Owner Author

This feature is no longer needed due to the following debugger feature.

#257 (comment)

Therefore, changes must be reverted.

zero-plusplus added a commit that referenced this issue Dec 19, 2022
Because the debugger feature can now suppress the dialog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant