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

Relative path patterns not supported by search api #121087

Closed
Zardddddd60 opened this issue Apr 12, 2021 · 10 comments
Closed

Relative path patterns not supported by search api #121087

Zardddddd60 opened this issue Apr 12, 2021 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) search-api
Milestone

Comments

@Zardddddd60
Copy link

  • VS Code Version:1.55.1
  • OS Version:macOS 10.15.5
  • Node Version: 12.18.2

Steps to Reproduce:
I try to debug a package symlinked to an application, with breakpoints set in typescript, but failed.

Firstly, without symlinked package, just the application, it works.
image

image

Then, with symlinked package, it dosen't work, even the package is not actually imported. Setting the path of testpackage in outFiles makes error.
image
image

I've made a reproductive example. Is there something I missed?

1.git clone [email protected]:Zardddddd60/testpackage.git, git clone [email protected]:Zardddddd60/testapp.git
2. symlink testpackage to testapp, and press debug in testapp

Does this issue occur when all extensions are disabled?: Yes/No
Yes

@vscodebot
Copy link

vscodebot bot commented Apr 12, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@weinand weinand assigned connor4312 and unassigned weinand Apr 12, 2021
@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Apr 12, 2021
@Zardddddd60
Copy link
Author

I think the key is how to set the outFiles. It works if I debug the javascript code of symlinked package with program pointing to typescript file. Is there is way to debug typescript code of symlinked package?

image

@connor4312
Copy link
Member

/jsDebugLogs

@Zardddddd60
Copy link
Author

Zardddddd60 commented Apr 13, 2021

/jsDebugLogs

Setting absolute path(/Users/liudong/ldd/test__/testpackage/**/*.js) of symlinked package in outFiles:
vscode-debugadapter-92cc30e1.json.gz

Setting relative path(${workspaceFolder}/node_modules/testpackage/**/*.js) of symlinked package:
vscode-debugadapter-03d7fa4d.json.gz

@connor4312
Copy link
Member

connor4312 commented Apr 13, 2021

Thanks for the logs and example repo! I think I can reproduce. It should only affect breakpoints that are passed very early on in the program, since the process that looks for sourcemaps ahead of time isn't finding results.

@roblourens although the path seems correct, it seems like setting this as a RelativePattern doesn't work:

As Zard reported, f I remove the extra outFiles pattern (so it's just **/*.js) then it works. Is this comma-delimiting the correct way to deal with these? Or should I just run separate searches for each include path? That would be easy to do.

Edit: it seems that passing in a relative pattern like ../testpacakge/**/*.js individually also does not work, so it seems like include just doesn't work with those. However, it does in the UI

It would be nice to fix that 🙂

@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug search-api and removed info-needed Issue requires more information from poster labels Apr 13, 2021
@roblourens
Copy link
Member

It should be like {a, b} if you have multiple patterns. But yeah, the search view has bonus features that don't show up other places. I think this would go all the way to our glob library. Did it come in from the user's config or your code?

@connor4312
Copy link
Member

Ah, cool, thanks. That made it not break, but it looks like relative patterns still aren't applying correctly.

@roblourens roblourens changed the title Debug symlinked package with typescript makes error Relative path patterns not supported by search api Apr 19, 2021
@roblourens roblourens assigned roblourens and unassigned connor4312 Apr 19, 2021
@roblourens roblourens added this to the Backlog milestone Apr 19, 2021
connor4312 added a commit to microsoft/vscode-js-debug that referenced this issue Apr 19, 2021
@andreamah
Copy link
Contributor

Ah, cool, thanks. That made it not break, but it looks like relative patterns still aren't applying correctly.

see #130992 (comment)

@andreamah andreamah assigned connor4312 and andreamah and unassigned roblourens Dec 16, 2022
@connor4312
Copy link
Member

This actually duplicates #168635, and should be fixed with microsoft/vscode-js-debug#1486 as well

@connor4312 connor4312 added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 16, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) search-api
Projects
None yet
Development

No branches or pull requests

6 participants
@roblourens @weinand @connor4312 @andreamah @Zardddddd60 and others