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

Avoid sending evaluated sources until they're first referenced on DAP #1939

Closed
connor4312 opened this issue Feb 5, 2024 · 1 comment · Fixed by #1940
Closed

Avoid sending evaluated sources until they're first referenced on DAP #1939

connor4312 opened this issue Feb 5, 2024 · 1 comment · Fixed by #1940
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@connor4312
Copy link
Member

In a Blazor case, there can be a ton of generated sources which can clog up the UI. We can improve this by omitting evaluated scripts from the protocol until the first time they're referenced.

@connor4312 connor4312 self-assigned this Feb 5, 2024
@connor4312 connor4312 added this to the February 2024 milestone Feb 5, 2024
@connor4312 connor4312 added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities and removed help wanted Issues identified as good community contribution opportunities labels Feb 5, 2024
connor4312 added a commit that referenced this issue Feb 5, 2024
connor4312 added a commit that referenced this issue Feb 5, 2024
@connor4312 connor4312 added the verification-needed Verification of issue is requested label Feb 18, 2024
@connor4312
Copy link
Member Author

connor4312 commented Feb 18, 2024

Verification, have a script like:

const logAdd = new Function('a', 'b', 'console.log(a + b);');
const returnAdd = new Function('a', 'b', 'a + b');
eval('1234');

debugger;
logAdd(2, 3);

debugger;
returnAdd(4, 5);
  • Debug it
  • On the first debugger statement, look in the "Loaded Sources" view. Verify there's no <eval> node there
  • Continue
  • Verify there's now an eval script and that the log in the Debug Console has a clickable source location attached
  • Step into returnAdd
  • Verify there's a second <eval> node and that you get what you expect when doing the step in

@hediet hediet added the verified Verification succeeded label Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants