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

Cannot find problemMatcher when isBackground: true #1

Closed
Skrypt opened this issue Dec 15, 2021 · 5 comments · Fixed by #2
Closed

Cannot find problemMatcher when isBackground: true #1

Skrypt opened this issue Dec 15, 2021 · 5 comments · Fixed by #2

Comments

@Skrypt
Copy link

Skrypt commented Dec 15, 2021

image

image

I'm trying to implement your solution in Orchard Core project. So far it's working but I'm getting this small issue when I try to start the launcher on the project. When I remove the "isBackground": true, it finds the proper problemMatcher but else it shows me this modal that requires me to click "debug anyway" every time. But everything works apart from that.

Let me know if you have an idea. Thanks.

See : OrchardCMS/OrchardCore#10881

@Trottero
Copy link
Owner

I don't have a proper fix for this yet, it is still on my TODOs. A work around for now would be to tick the "Remember my choice for this task" and then clicking Debug Anyway.

I think it has to do with the way the $msCompile matcher works with background tasks

@mdowais
Copy link

mdowais commented Jan 16, 2022

After a few attempts, this seems to work.

{
            "label": "watch",
            "command": "dotnet",
            "type": "process",
            "isBackground": true,
            "args": [
                "watch",
                "run",
            ],
            "problemMatcher": {
                "base": "$msCompile",
                "background": {
                    "beginsPattern": {
                        "regexp": "Building...(.+)?|File changed:(.+)?"
                    },
                    "endsPattern": {
                        "regexp": "Application started|Hot reload of changes succeeded."
                    }
                }
            }
        },

@mdowais
Copy link

mdowais commented Jan 16, 2022

but problem matcher is not working properly maybe,,

@Skrypt
Copy link
Author

Skrypt commented Feb 11, 2022

I tried what you are suggesting in Orchard Core and I had no success with the problem matcher. Still have the same issue. I'm not sure if I should invest time finding a solution for that or wait on the VS Code team to implement it directly in VS Code. To me, using this extension right now is the best compromise.

@Trottero Trottero mentioned this issue Mar 5, 2022
@Trottero
Copy link
Owner

Trottero commented Mar 5, 2022

@mdowais @Skrypt

Thanks a lot for your efforts! I've updated the extension so it is no longer neccesary to use "isBackground": true in your tasks. dotnetwatchattach can now be configured to manage the lifetime of a task by setting the task property in the debug configuration. The example repository and readme have been updated to reflect this change. Feel free to reopen this issue if this doesn't fix the problem.

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

Successfully merging a pull request may close this issue.

3 participants