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

Step In doesn't skip anonymous functions even if the blob pattern is present in skip files #1637

Open
shashankvidiyalaC3 opened this issue Apr 3, 2023 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality

Comments

@shashankvidiyalaC3
Copy link

Describe the bug
When stepping into anonymous functions with skip file configuration as follows

 "skipFiles": [
                "<node_internals>/**",
                "**evalmachine.<anonymous>**",
                "**<eval>**",
                "**<eval>/VM**"
                
            ],

It does not skip anonymous functions

To Reproduce
Steps to reproduce the behavior:

  1. Create a file with anonymous function
  2. Update the skip files configuration
  3. add breakpoint before function call
  4. Click on step in

Log File

vscode-debugadapter-508ea89d.json.gz

VS Code Version: 1.77.0

Additional context
Add any other context about the problem here.
Kapture 2023-04-03 at 09 28 55

@shashankvidiyalaC3 shashankvidiyalaC3 added the bug Issue identified by VS Code Team member as probable bug label Apr 3, 2023
@connor4312
Copy link
Member

connor4312 commented Apr 3, 2023

Thanks for the issue, this doesn't work because the URL of evaluated functions is actually empty -- we generate a fake name on the debugger side. We could have a feature to allow skipping these.

@connor4312 connor4312 added feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels Apr 3, 2023
@Spown
Copy link

Spown commented Dec 14, 2023

Thanks for the issue, this doesn't work because the URL of evaluated functions is actually empty -- we generate a fake name on the debugger side. We could have a feature to allow skipping these.

Yeah, it should've been, but the internal burocracy killed the further discussion of this issue. Apparently it's as-designed now for "reasons". Frankly I don't get how an option to filter out evals became "generically ignore all eval'd scripts"...

@connor4312
Copy link
Member

connor4312 commented Dec 14, 2023

@Spown this issue is still open, so it's not "as designed." If you're passionate about this issue, we welcome PRs! Check out the contributing guide for how to get started: https://github.com/microsoft/vscode-js-debug/blob/main/CONTRIBUTING.md

I don't get how an option to filter out evals became "generically ignore all eval'd scripts"...

I'm not sure I get what you're saying here. Unless assigned a sourceURL at evaluation time by the program, evaluated scripts are pretty indistinguishable. We could allow filtering on the 'fake name', but this is just an incremented number so it's not a very stable thing to depend on.

@Spown
Copy link

Spown commented Dec 16, 2023

Unless assigned a sourceURL at evaluation time by the program, evaluated scripts are pretty indistinguishable. We could allow filtering on the 'fake name', but this is just an incremented number so it's not a very stable thing to depend on.
the URL of evaluated functions is actually empty

I don't know how exactly the stack item is processed, but if the URL is empty, wouldn't it be possible to fill it with some ID that is not a valid url? The same <eval>/VM123 string f.e? But I assume a faulty url would create a myrriad other problems in different places...

We could allow filtering on the 'fake name', but this is just an incremented number so it's not a very stable thing to depend on.

We have a combination of:

  • empty URL
  • forbidden for a file / reserved for a URL characters in the fake name: < & > (so it's already indicative the item can't be associated with a non-virtual object)
  • a definite naming pattern: ^\<eval\>\/VM\d+$

looks pretty stable to me. if a stack item has no URL - the skipFiles filter would match against the fake name property and only in this case. Hard to imagine what can go wrong with this approach.

@Spown this issue is still open, so it's not "as designed."
I'm not sure I get what you're saying here.

the people (@roblourens, @weinand, etc) who were discussing the core issue across a dozen dupes and related issues (like showing evals in the stack, etc) over several years have redirected it all into the vscode#31537 and passed it onto you @connor4312, who immediately made a decision it was "as designed ... [because] we don't want to just generically ignore all eval'd scripts" and a bot closed it shortly after. This is the state the core issue (URL of evaluated functions being actually empty) was since then.

If you're passionate about this issue, we welcome PRs!

I don't have nearly the understanding of the architecture (or even TS) to even start. I looked into some code, and it was clear to me it's easier to hit F10 a couple odd times than even try to fix it myself.

Sorry if I sound a bit toxic or unjustifiably demending. I know how open source works. Nobody is obligated to do anything / "DIY & PR". I'm just frustrated that a resolution to a seemingly trivial issue seems to be blocked by both the bureaucracy and the weight of the architecture since at the very least 2017.

@connor4312
Copy link
Member

connor4312 commented Dec 18, 2023

microsoft/vscode#31537 is as-designed, as it refers to omitting anonymous scripts entirely from the debug protocol, which leads to the problems I mentioned in microsoft/vscode#31537 (comment). This issue refers to allowing evaluated scripts to be referenced in skipFiles, which is quite different. If neither of these issues capture the issue you're facing, please let me know. It may be more useful to start from the user scenario you're trying to do, if it's different than the one originally reported in this issue.

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
Projects
None yet
Development

No branches or pull requests

3 participants