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

Fix adding a breakpoint in a JS file while debugging a blazor app #1488

Merged
merged 5 commits into from
Dec 27, 2022

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented Dec 16, 2022

When adding a breakpoint the urlRegex passed to a blazor app for a js app before this PR was:
"[fF][iI][lL][eE]:\/\/\/[tT]:\/[tT][hH][aA][yY][sS]\/[oO][fF][fF][iI][cC][eE]-[aA][dD][dD]-[iI][nN]-[sS][aA][mM][pP][lL][eE][sS]\/[sS][aA][mM][pP][lL][eE][sS]\/[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[pP][aA][gG][eE][sS]\/[iI][nN][dD][eE][xX]\.[rR][aA][zZ][oO][rR]\.[jJ]sS|[tT]:\\[tT][hH][aA][yY][sS]\\[oO][fF][fF][iI][cC][eE]-[aA][dD][dD]-[iI][nN]-[sS][aA][mM][pP][lL][eE][sS]\\[sS][aA][mM][pP][lL][eE][sS]\\[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[pP][aA][gG][eE][sS]\\[iI][nN][dD][eE][xX]\.[rR][aA][zZ][oO][rR]\.[jJ]sS"

And using this PR will be:
[fF][iI][lL][eE]:\/\/\/[tT]:\/[tT][hH][aA][yY][sS]\/[oO][fF][fF][iI][cC][eE]-[aA][dD][dD]-[iI][nN]-[sS][aA][mM][pP][lL][eE][sS]\/[sS][aA][mM][pP][lL][eE][sS]\/[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[pP][aA][gG][eE][sS]\/[iI][nN][dD][eE][xX]\.[rR][aA][zZ][oO][rR]\.[jJ]sS|[tT]:\\[tT][hH][aA][yY][sS]\\[oO][fF][fF][iI][cC][eE]-[aA][dD][dD]-[iI][nN]-[sS][aA][mM][pP][lL][eE][sS]\\[sS][aA][mM][pP][lL][eE][sS]\\[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[pP][aA][gG][eE][sS]\\[iI][nN][dD][eE][xX]\.[rR][aA][zZ][oO][rR]\.[jJ]sS|[hH][tT][tT][pP][sS]:\/\/[lL][oO][cC][aA][lL][hH][oO][sS][tT]:7287\/[pP][aA][gG][eE][sS]\/[iI][nN][dD][eE][xX]\.[rR][aA][zZ][oO][rR]\.[jJ]sS"

Adding the https://localhost:7287/pages/index.razor.js as it's done when debugging without using blazorSourcePath.

Without the PR it was necessary to disable and enable the breakpoint after the APP is already started to bind the breakpoint.

Related to OfficeDev/Office-Add-in-samples#444

@thaystg
Copy link
Member Author

thaystg commented Dec 16, 2022

@lewing

@thaystg thaystg changed the title Fix adding a breakpoint in a JS file in a blazor app. Fix adding a breakpoint in a JS file while debugging a blazor app Dec 16, 2022
connor4312
connor4312 previously approved these changes Dec 16, 2022
@connor4312
Copy link
Member

It looks like there's a unit test that needs to be updated 🙂

@connor4312
Copy link
Member

Fyi it looks like the unit test is still failing. You can single out and run that test locally using npm run test:golden -- -g "generates the correct regexp in local scenarios"

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 this pull request may close these issues.

None yet

2 participants