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

scripts run with 'discard' option set to true are shown as [temp] during debug with Visual Studio Code #158

Closed
77it opened this issue Jan 23, 2020 · 3 comments

Comments

@77it
Copy link

77it commented Jan 23, 2020

trying to debug some scripts, I found that scripts run with Evaluate or Execute discard option set to true always pollute the <node internals> section of Visual Studio Code while debugging.

the only difference between discarded and not discarded scripts is that discarded scripts has "[temp]" add to them.

follows an image with the <node internals> section of Visual Studio Code

image

@ClearScriptLib
Copy link
Collaborator

ClearScriptLib commented Jan 24, 2020

Hi @stefano77it,

This behavior is by design, going back to a time when ClearScript only supported Windows script engines. Back then discard had more of an effect, as temporary scripts would disappear from the debugger user interface after execution.

V8 and modern debuggers don't honor discard, but the "[temp]" suffix remains. Is that a serious issue for you?

Thanks!

@77it
Copy link
Author

77it commented Jan 25, 2020

It's not a serious issue, because using Invoke the <node internals> section of Visual Studio Code is not polluted with the calls to functions (that in my case are hundreds).

However, I think you should update the API documentation of Evaluate and Execute because both contain the phrase

Discarding this document removes it from view but has no effect on the script engine

which is no longer aligned to V8 and modern debuggers.

ClearScriptLib added a commit that referenced this issue Apr 13, 2020
…Hub Issue #160); fixed 64-bit V8 initialization on Azure App Service (GitHub Issue #166); enabled DirectAccess for ComVisible .NET objects (GitHub Issue #161); added ScriptEngine.ExposeHostObjectStaticMembers (GitHub Issue #152); added ScriptEngine.UndefinedImportValue and made Undefined.Value public (GitHub Issue #154); enhanced ExtendedHostFunctions.typeLibEnums to pull in external enumerations; added thread affinity enforcement in WindowsScriptEngine.Dispose; eliminated KeyNotFoundException when checking for system documents (GitHub Issue #169); enabled the use of the application's root folder as a backup for its local data folder (GitHub Issue #171); reduced minimum CPU profile and heap size sampling intervals to 125 ms; updated deployment and API documentation, resolving GitHub Issues #158 and #159. Tested with V8 8.1.307.28.
@ClearScriptLib
Copy link
Collaborator

Documentation updated in Version 6.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants