vscode-js-debug
vscode-js-debug copied to clipboard
Step In doesn't skip anonymous functions even if the blob pattern is present in skip files
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:
- Create a file with anonymous function
- Update the skip files configuration
- add breakpoint before function call
- 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.

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.
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"...
@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.
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.
https://github.com/microsoft/vscode/issues/31537 is as-designed, as it refers to omitting anonymous scripts entirely from the debug protocol, which leads to the problems I mentioned in https://github.com/microsoft/vscode/issues/31537#issuecomment-916398385. 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.