You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an object has an __Enum property which refers to a built-in (native) method, the debugger engine calls the enumerator automatically and includes the items directly as child properties of the object. Built-in enumerators all support the following pattern described in the documentation, and are assumed safe to execute automatically:
If NumberOfVars is 2, the enumerator is expected to assign the key or index of an item to the first parameter and the value to the second parameter. Each key or index should be accepted as a parameter of the __Item property. This enables DBGp-based debuggers to get or set a specific item after listing them by invoking the enumerator.
If the method is instead user-defined, the debugger engine outputs the <enum> property to allow the client or user to choose whether to execute the enumerator. Without any special handling, SciTE4AutoHotkey and DebugVars.ahk are able to use this to display the items of an object with custom enumerator.
However, as noted in #133, vscode-autohotkey-debug filters out the <enum> property.
getting its value through the debugger will cause errors in subsequent communication with the debugger.
Other clients handle it without problem. dbgp_console.ahk can be used to verify that the response is valid and susequent commands work.
The engine currently does not suppress exceptions thrown by the enumerator (it should), but this does not appear to cause any issues with debugger communication. Once the error dialog is dismissed, the debugger engine ends enumeration and completes the response as if there were no further items.
The text was updated successfully, but these errors were encountered:
The engine currently does not suppress exceptions thrown by the enumerator (it should), but this does not appear to cause any issues with debugger communication.
I spoke too soon..
If redirection has been enabled with stdout or stderr and the enumerator causes output (OutputDebug, FileAppend or throwing an exception), the engine outputs an incomplete property response followed by a stream packet. This bug might have been the cause of the communication error.
AutoHotkey/AutoHotkey@41710ffd fixes the stdout/stderr issue. I tested OutputDebug during property evaluation with your extension, and it is working.
A workaround for v2.0.13 and v2.1-alpha.9 would be to disable stderr/stdout redirection before evaluating properties. (Ideally you would do this at most once each time the debugger enters a break state, and re-enable it prior to issuing a continuation command.)
If an object has an
__Enum
property which refers to a built-in (native) method, the debugger engine calls the enumerator automatically and includes the items directly as child properties of the object. Built-in enumerators all support the following pattern described in the documentation, and are assumed safe to execute automatically:If the method is instead user-defined, the debugger engine outputs the
<enum>
property to allow the client or user to choose whether to execute the enumerator. Without any special handling, SciTE4AutoHotkey and DebugVars.ahk are able to use this to display the items of an object with custom enumerator.However, as noted in #133, vscode-autohotkey-debug filters out the
<enum>
property.Other clients handle it without problem. dbgp_console.ahk can be used to verify that the response is valid and susequent commands work.
The engine currently does not suppress exceptions thrown by the enumerator (it should), but this does not appear to cause any issues with debugger communication. Once the error dialog is dismissed, the debugger engine ends enumeration and completes the response as if there were no further items.
The text was updated successfully, but these errors were encountered: